Introduction to Number Representation F451 Year 10 Computing Binary Numbers Binary Numbers Sign/Magnitude Sign/Magnitude 2s Complement 2s Complement Binary.

Slides:



Advertisements
Similar presentations
A-Level Computing#BristolMet Session Objectives#9 express numbers in binary, binary-coded decimal (BCD), octal and hexadecimal; describe and use two’s.
Advertisements

ICS312 Set 2 Representation of Numbers and Characters.
HEXADECIMAL NUMBERS Code
Lecturer: Omid Jafarinezhad Sharif University of Technology Department of Computer Engineering 1 Fundamental of Programming (C) Lecture 2 Number Systems.
Chapter 2 : Number System
Digital Fundamentals Floyd Chapter 2 Tenth Edition
Data Representation Computer Organization &
Data Representation COE 205
Number Systems Decimal (Base 10) Binary (Base 2) Hexadecimal (Base 16)
1 CSE1301 Computer Programming Lecture 28 Number Representation (Integer)
Data Representation in Computers
Digital Fundamentals Floyd Chapter 2 Tenth Edition
Data Representation (in computer system) Computer Fundamental CIM2460 Bavy LI.
S. Barua – CPSC 240 CHAPTER 2 BITS, DATA TYPES, & OPERATIONS Topics to be covered are Number systems.
Data Storage. SIGN AND MAGNITUDE Storing and representing numbers.
COMPUTER FUNDAMENTALS David Samuel Bhatti
Digital Logic Chapter 2 Number Conversions Digital Systems by Tocci.
Number Systems and Codes
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd.
ACOE1611 Data Representation and Numbering Systems Dr. Costas Kyriacou and Dr. Konstantinos Tatas.
Chapter 3 Representing Numbers and Text in Binary Information Technology in Theory By Pelin Aksoy and Laura DeNardis.
Computers Organization & Assembly Language
EKT 121 / 4 ELEKTRONIK DIGIT 1 CHAPTER 1 : INTRODUCTION.
Data Representation S2. This unit covers how the computer represents- Numbers Text Graphics Control.
Binary Arithmetic & Data representation
Lec 3: Data Representation Computer Organization & Assembly Language Programming.
COMPSCI 210 Semester Tutorial 1
Number Systems Spring Semester 2013Programming and Data Structure1.
ICS312 Set 1 Representation of Numbers and Characters.
Number Systems Decimal (Base 10) –10 digits (0,1,2,3,4,5,6,7,8,9) Binary (Base 2) –2 digits (0,1) Digits are often called bits (binary digits) Hexadecimal.
Computer Systems Architecture Copyright © Genetic Computer School 2008 CSA 1- 0 Lesson 1 Number System.
Number Systems Decimal (Base 10) –10 digits (0,1,2,3,4,5,6,7,8,9) Binary (Base 2) –2 digits (0,1) Digits are often called bits (binary digits) Hexadecimal.
1 Data Representation Characters, Integers and Real Numbers Binary Number System Octal Number System Hexadecimal Number System Powered by DeSiaMore.
Data Representation Conversion 24/04/2017.
THE BINARY SYSTEM.
Data Representation, Number Systems and Base Conversions
CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC
Computer Math CPS120 Introduction to Computer Science Lecture 4.
AEEE2031 Data Representation and Numbering Systems.
SAK Chapter 21 Chapter 2 : Number System 2.1 Decimal, Binary, Octal and Hexadecimal Numbers 2.2 Relation between binary number system with other.
WEEK #2 NUMBER SYSTEMS, OPERATION & CODES (PART 1)
Irvine, Kip R. Assembly Language for Intel-Based Computers 6/e, Signed Integers The highest bit indicates the sign. 1 = negative, 0 = positive.
Number Systems Denary Base 10 Binary Base 2 Hexadecimal Base 16
Orange Coast College Business Division Computer Science Department CS 116- Computer Architecture Logic Design: Part 1.
Chapter 1 : Introduction to Binary Systems 1.1. Introduction to Digital Systems 1.2. Binary Numbers 1.3. Number Base Conversion 1.4. Octal and Hexadecimal.
Introduction to Number Representation A451 GCSE Computing.
Nguyen Le CS147.  2.4 Signed Integer Representation  – Signed Magnitude  – Complement Systems  – Unsigned Versus Signed Numbers.
Data Representation COE 301 Computer Organization Dr. Muhamed Mudawar
CS 125 Lecture 3 Martin van Bommel. Overflow In 16-bit two’s complement, what happens if we add =
Fall’ 2014 Lesson - 1 Number System & Program Design CSE 101.
CHAPTER 3 BINARY NUMBER SYSTEM. Computers are electronic machines which operate using binary logic. These devices use two different values to represent.
Number Systems. The position of each digit in a weighted number system is assigned a weight based on the base or radix of the system. The radix of decimal.
Advanced Binary b. describe and use two’s complement and sign and magnitude to represent negative integers; c. perform integer binary arithmetic, that.
3.1 Denary, Binary and Hexadecimal Number Systems We use the denary (base 10) number system in our daily life for counting and calculation. Computers use.
Lec 3: Data Representation
Binary 1 Basic conversions.
3.1 Denary, Binary and Hexadecimal Number Systems
CSCI 198: Lecture 4: Data Representation
CHAPTER 1 : INTRODUCTION
CSCI 161: Lecture 4: Data Representation
Introduction The term digital is derived from the way computers perform operation, by counting digits. Application of digital technology: television, communication.
CSE 102 Introduction to Computer Engineering
Number Systems.
TOPICS Information Representation Characters and Images
Data Representation Conversion 05/12/2018.
Dr. Clincy Professor of CS
C1 Number systems.
COMS 161 Introduction to Computing
Storing Negative Integers
Computer Architecture CST 250
Presentation transcript:

Introduction to Number Representation F451 Year 10 Computing Binary Numbers Binary Numbers Sign/Magnitude Sign/Magnitude 2s Complement 2s Complement Binary Numbers Binary Numbers Sign/Magnitude Sign/Magnitude 2s Complement 2s Complement

BinaryBinary

BinaryBinary All computer processing is carried out digitally. This means that the processor handles instructions as binary codes – zeros and ones. All data on a PC is essentially 0’s and 1’s.

Converting binary into positive denary integers Whole positive denary (base ten) numbers are converted into binary as follows: 135 from denary into binary = MSBMSBLSBLSB

The repeated division method A method for converting denary to binary: 98 in denary into binary: 98 divide by 2 = 49 remainder 0 49 divide by 2 = 24 remainder 1 24 divide by 2 = 12 remainder 0 12 divide by 2 = 6 remainder 0 6 divide by 2 = 3 remainder 0 3 divide by 2 = 1 remainder 1 1 divide by 2 = 0 remainder 1 0 divide by 2 = 0 remainder 0 Read the binary code from the remainder from bottom to the top: which equals 98 DIVMODDIVMOD

Binary Coded Decimal (BCD) BCD represents denary integers using blocks of four binary digits. Each block of four is converted and the denary values are then read off: Therefore in BCD = 938 in denary

Uses of BCD BCD enables fast conversions from denary to binary for applications such as pocket calculators. Each digit on a calculator corresponds directly to a four-bit block in BCD.

Storing Negative Integers 1 method is Sign/Magnitude /- MSBMSB is a Negative, 0 is a Positive

Sign/MagnitudeSign/Magnitude This method has some limitations 2 types of data in the same value (MSB is a sign) Makes calculations difficult by losing 1 bit / maximum number SignSign Value or Magnitude

Storing Negative Integers Another method is 2s Complement =-75

2s Complement Conversion Stage 1 : work out 117 in binary Stage 1 : work out 117 in binary Stage 2 : Reverse the 0’s and 1’s Stage 2 : Reverse the 0’s and 1’s Stage 3 : Plus 1 Stage 3 : Plus 1 10

Representing characters There are three main coding systems that provide conversions of keyboard characters into binary: –EBCDIC –ASCII –UNICODE

EBCDICEBCDIC EBCDIC stands for Extended Binary Coded Decimal Interchange Code. It is an extension of BCD which includes non-numeric characters, including all the keyboard characters and special characters. It is commonly used to encode data onto magnetic tape.

ASCIIASCII ASCII stands for the American Standard Code for Information Interchange. It has been adopted as the industry- standard way of representing keyboard characters as binary codes. Every keyboard character is given a corresponding binary code. ASCII uses an 8-bit code to provide 256 characters.

UNICODEUNICODE UNICODE is the new standard to emerge that is replacing ASCII. It has been adopted by many of the big businesses in the computing industry. It is designed to cover more of the characters that are found in languages across the world. It has become important due to the increased use of the Internet, as more data is being passed around globally.