Number System and Codes

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

NUMBERS DESCRIBE THE SYSTEM
HEXADECIMAL NUMBERS Code
Assembly Language and Computer Architecture Using C++ and Java
Number Systems Decimal (Base 10) Binary (Base 2) Hexadecimal (Base 16)
CSCE 211: Digital Logic Design Chin-Tser Huang University of South Carolina.
Digital Circuits. Analog and Digital Signals Noise margins in Logic Circuits VMVM.
VIT UNIVERSITY1 ECE 103 DIGITAL LOGIC DESIGN CHAPTER I NUMBER SYSTEMS AND CODES Reference: M. Morris Mano & Michael D. Ciletti, "Digital Design", Fourth.
DIGITAL SYSTEMS TCE1111 Representation and Arithmetic Operations with Signed Numbers Week 6 and 7 (Lecture 1 of 2)
Number Systems and Codes Discussion D4.1. Number Systems Counting in Binary Positional Notation Hexadecimal Numbers Negative Numbers.
S. Barua – CPSC 240 CHAPTER 2 BITS, DATA TYPES, & OPERATIONS Topics to be covered are Number systems.
Data Representation – Chapter 3 Sections 3-2, 3-3, 3-4.
FIGURES FOR CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION
1 Lecture 2: Number Systems Binary numbers Base conversion Arithmetic Number systems  Sign and magnitude  Ones-complement  Twos-complement Binary-coded.
1.6 Signed Binary Numbers.
Binary Representation and Computer Arithmetic
Lecture 5.
EKT 121 / 4 ELEKTRONIK DIGIT 1 CHAPTER 1 : INTRODUCTION.
Digital Systems and Logic Design
NUMBER REPRESENTATION CHAPTER 3 – part 3. ONE’S COMPLEMENT REPRESENTATION CHAPTER 3 – part 3.
Computer Architecture
Binary Arithmetic & Data representation
1 Digital Systems and Binary Numbers EE 208 – Logic Design Chapter 1 Sohaib Majzoub.
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION.
1 Digital Design: Number Systems Credits : Slides adapted from: J.F. Wakerly, Digital Design, 4/e, Prentice Hall, 2006 C.H. Roth, Fundamentals of Logic.
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.
Number Systems. Today Decimal Hexadecimal Binary –Unsigned Binary –1’s Complement Binary –2’s Complement Binary.
Data Representation Dr. Ahmed El-Bialy Dr. Sahar Fawzy.
46 Number Systems Problem: Implement simple pocket calculator Need: Display, adders & subtractors, inputs Display: Seven segment displays Inputs: Switches.
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION
1 EENG 2710 Chapter 1 Number Systems and Codes. 2 Chapter 1 Homework 1.1c, 1.2c, 1.3c, 1.4e, 1.5e, 1.6c, 1.7e, 1.8a, 1.9a, 1.10b, 1.13a, 1.19.
ECE 301 – Digital Electronics Unsigned and Signed Numbers, Binary Arithmetic of Signed Numbers, and Binary Codes (Lecture #2)
Summer 2012ETE Digital Electronics1 Binary Arithmetic of Signed Binary Numbers.
The Teacher CP4 Binary and all that… CP4 Revision.
Chapter 2: The Logic of Compound Statements 2.5 Application: Number Systems and Circuits for Addition 1 Counting in binary is just like counting in decimal.
Positional Number Systems
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.
Lecture 2 Binary Values and Number Systems. The number 943 is an example of a number written in positional notation. The relative positions of the digits.
ECE 2110: Introduction to Digital Systems Signed Addition/Subtraction.
The Teacher CP4 Binary and all that… CP4 Revision.
Number Systems Binary to Decimal Octal to Decimal Hexadecimal to Decimal Binary to Octal Binary to Hexadecimal Two’s Complement.
Computer Math CPS120 Introduction to Computer Science Lecture 4.
Tutorial: ITI1100 Dewan Tanvir Ahmed SITE, UofO
Introduction to Microprocessors Chapter 2. Decimal or Base 10 Numbers  Have ten different digits (0-9)  It is a weighted number system. Each position.
WEEK #2 NUMBER SYSTEMS, OPERATION & CODES (PART 1)
Digital Fundamentals Tenth Edition Floyd Chapter 2 © 2008 Pearson Education.
69 Decimal (Base 10) Numbers n Positional system - each digit position has a value n 2534 = 2*1, * *10 + 4*1 n Alternate view: Digit position.
Assoc. Prof. Dr. Ahmet Turan ÖZCERİT.  The necessity and advantages of coding  The variety of coding systems You will learn: 2.
School of Computer and Communication Engineering, UniMAP Mohd ridzuan mohd nor DKT 122/3 - DIGITAL SYSTEM I Chapter.
DIGITAL SYSTEMS Number systems & Arithmetic Rudolf Tracht and A.J. Han Vinck.
IT1004: Data Representation and Organization Negative number representation.
NUMBER SYSTEMS AND CODES. CS Digital LogicNumber Systems and Codes2 Outline Number systems –Number notations –Arithmetic –Base conversions –Signed.
Reasons to  Binary With Mrs
©Brooks/Cole, 2003 Chapter 3 Number Representation.
©2010 Cengage Learning SLIDES FOR CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION Click the mouse to move to the next page. Use the ESC key to exit.
ECE DIGITAL LOGIC LECTURE 3: DIGITAL COMPUTER AND NUMBER SYSTEMS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 01/19/2016.
Arithmetic Chapter 4 Subject: Digital System Year: 2009.
Digital Logic Design Lab 1,2 By Nora Alaqeel.
Computer Organization 1 Data Representation Negative Integers.
Lecture No. 4 Computer Logic Design. Negative Number Representation 3 Options –Sign-magnitude –One’s Complement –Two’s Complement  used in computers.
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.
COMPUTER ARITHMETIC Binary Coded Decimal Presented By Chung Wai Chow.
Negative Number Sign-Magnitude: left-most bit as the sign bit –16 bits –Example: 4-bit numbers is given by is given by ’s complement:
Integer Real Numbers Character Boolean Memory Address CPU Data Types
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION
COMS 161 Introduction to Computing
Number Systems.
Chapter 1 (Part c) Digital Systems and Binary Numbers
Presentation transcript:

Number System and Codes Chapter 3 Number System and Codes

Decimal and Binary Numbers

Decimal and Binary Numbers

Converting Decimal to Binary Sum of powers of 2

Converting Decimal to Binary Repeated Division

Binary Numbers and Computers

Hexadecimal Numbers

Converting decimal to hexadecimal

Converting binary to hexadecimal Converting hexadecimal to binary?

Hexadecimal numbers

Binary arithmetic Binary addition

Representing Integers with binary Some of challenges:- Integers can be positive or negative Each integer should have a unique representation The addition and subtraction should be efficient.

Representing a positive numbers

Representing a negative numbers using Sign-Magnitude notation -5 = 1101 4-bits sign-manitude -55= 10110111 8-bits sign-magnitude

1’s Complement The 1’s complement representation of the positive number is the same as sign-magnitude. +84 = 01010100

1’s Complement The 1’s complement representation of the negative number uses the following rule:- Subtract the magnitude from 2n-1 For example: -36 = ??? +36 = 0010 0100

1’s Complement Example :- - 57 +57 = 0011 1001 -57 = 1100 0110

Converting to decimal format

2’s Complement For negative numbers:- Subtract the magnitude from 2n. Or Add 1 to the 1’s complement

Example

Convert to decimal value Positive values:- 0101 1001 = +89 Negative values

Two's Complement Arithmetic

Adding Positive Integers in 2's Complement Form Overflow in Binary Addition

Overflow in Binary Addition

Overflow in Binary Addition

Overflow in Binary Addition

Adding Positive and Negative Integers in 2's Complement Form

Adding Positive and Negative Integers in 2's Complement Form

Subtraction of Positive and Negative Integers

Digital Codes Binary Coded Decimal (BCD)

BCD

BCD

4221 Code

Gray Code In pure binary coding or 8421 BCD then counting from 7 (0111) to 8 (1000) requires 4 bits to be changed simultaneously. Gray coding avoids this since only one bit changes between subsequent numbers

Binary –to-Gray Code Conversion

Gray –to-Binary Conversion

Gray –to-Binary Conversion

The Excess-3- Code

Parity The method of parity is widely used as a method of error detection. Extar bit known as parity is added to data word The new data word is then transmitted. Two systems are used: Even parity: the number of 1’s must be even. Odd parity: the number of 1’s must be odd.

Parity Example: Odd parity Even Parity 110010 110011 11001 111101 111100 11110 110001 110000 11000