Chapter 1 (Part c) Digital Systems and Binary Numbers

Slides:



Advertisements
Similar presentations
Addition and Subtraction. Outline Arithmetic Operations (Section 1.2) – Addition – Subtraction – Multiplication Complements (Section 1.5) – 1’s complement.
Advertisements

A digital system is a system that manipulates discrete elements of information represented internally in binary form. Digital computers –general purposes.
CSCE 211: Digital Logic Design Chin-Tser Huang University of South Carolina.
VIT UNIVERSITY1 ECE 103 DIGITAL LOGIC DESIGN CHAPTER I NUMBER SYSTEMS AND CODES Reference: M. Morris Mano & Michael D. Ciletti, "Digital Design", Fourth.
Number System and Codes
Data Representation – Chapter 3 Sections 3-2, 3-3, 3-4.
Chapter 3 Data Representation part2 Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2010.
1.6 Signed Binary Numbers.
Digital Systems and Binary Numbers
Chapter3 Fixed Point Representation Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2009.
Binary Arithmetic & Data representation
Number systems & Binary codes MODULE 1 Digital Logic Design Ch1-2 Outline of Chapter 1  1.1 Digital Systems  1.2 Binary Numbers  1.3 Number-base Conversions.
CE1111 :Digital Logic Design lecture 01 Introduction Dr. Atef Ali Ibrahim.
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.
Summer 2012ETE Digital Electronics1 Binary Arithmetic of Signed Binary Numbers.
1 IT 231, CMPE 331 Digital Logic Design Week 2 Number systems and arithmetic.
Operations on Bits Arithmetic Operations Logic Operations
Number Systems Binary to Decimal Octal to Decimal Hexadecimal to Decimal Binary to Octal Binary to Hexadecimal Two’s Complement.
©Brooks/Cole, 2003 Chapter 4 Operations on Bits. ©Brooks/Cole, 2003 Apply arithmetic operations on bits when the integer is represented in two’s complement.
ECE 331 – Digital System Design Representation and Binary Arithmetic of Negative Numbers and Binary Codes (Lecture #10) The slides included herein were.
Tutorial: ITI1100 Dewan Tanvir Ahmed SITE, UofO
Data Representation in Computer Systems. 2 Signed Integer Representation The conversions we have so far presented have involved only positive numbers.
Signed Binary Numbers Arithmetic Subtraction – In 2’s-complement form: Example: 1.Take the 2’s complement of the subtrahend (including the sign bit) and.
Introduction * Binary numbers are represented with a separate sign bit along with the magnitude. * For example, in an 8-bit binary number, the MSB is.
Chapter 1: Binary Systems
ECE DIGITAL LOGIC LECTURE 3: DIGITAL COMPUTER AND NUMBER SYSTEMS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 01/19/2016.
ECE DIGITAL LOGIC LECTURE 4: BINARY CODES Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 01/26/2016.
1 Integer Representations V1.0 (22/10/2005). 2 Integer Representations  Unsigned integer  Signed integer  Sign and magnitude  Complements  One’s.
Chapter 6. Digital Arithmetic: Operations and Circuits
N 3-1 Data Types  Binary information is stored in memory or processor registers  Registers contain either data or control information l Data are numbers.
Number Systems By, B. R. Chandavarkar CSE Dept., NITK, Surathkal.
Lecture 4: Digital Systems & Binary Numbers (4)
Unit I From Fundamentals of Logic Design by Roth and Kinney.
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:
Unit 1 Introduction Number Systems and Conversion.
Chapter 1 Digital Systems and Binary Numbers
Cosc 2150: Computer Organization
David Kauchak CS 52 – Spring 2017
ECE 2110: Introduction to Digital Systems
Chapter 4 Operations on Bits.
Integers’ Representation. Binary Addition. Two's Complement.
Digital Logic and Computer Organization
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION
Binary Arithmetic Binary arithmetic is essential in all digital computers and in many other types of digital systems. Addition, Subtraction, Multiplication,
Digital Systems and Binary Numbers
Introduction The term digital is derived from the way computers perform operation, by counting digits. Application of digital technology: television, communication.
Chapter 1 Digital Systems and Binary Numbers
IT 0213: INTRODUCTION TO COMPUTER ARCHITECTURE
Exercise: Add these two single precision IEEE 754 numbers: … …0 Left number: 1.101x24 Right number: 1.011x 22= x24.
INTRODUCTION TO LOGIC DESIGN Chapter 1 Digital Systems and Binary Numbers gürtaçyemişçioğlu.
Data Representation Data Types Complements Fixed Point Representation
MMNSS COLLEGE,KOTTIYAM DEPARTMENT OF PHYSICS
Digital Logic & Design Lecture 02.
Data Representation – Chapter 3
Digital Logic Design (ECEg3141) 2. Number systems, operations & codes 1.
1.6) Storing Integer:.
Unit 18: Computational Thinking
Digital Systems and Binary Numbers
CPS120: Introduction to Computer Science
ECE 331 – Digital System Design
COMS 161 Introduction to Computing
Chapter3 Fixed Point Representation
靜夜思 床前明月光, 疑是地上霜。 舉頭望明月, 低頭思故鄉。 ~ 李白 李商隱.
1.6) Storing Integer: 1.7) storing fraction:
CHAPTER 69 NUMBER SYSTEMS AND CODES
Chapter 1 Introduction.
Two’s Complement & Binary Arithmetic
Today Binary addition Representing negative numbers 2.
Presentation transcript:

Chapter 1 (Part c) Digital Systems and Binary Numbers Digital Logic Design Chapter 1 (Part c) Digital Systems and Binary Numbers Originally by T.Tasniem Nasser Al-Yahya    

Outline of Chapter 1 (Part c) 1.6 Signed Binary Numbers 1.7 Binary Codes

Outline of Chapter 1 (Part c) 1.6 Signed Binary Numbers 1.7 Binary Codes

1.6 Signed Binary Numbers To represent negative integers, we need a notation for negative values. It is customary to represent the sign with a bit placed in the leftmost position of the number. The convention is to make the sign bit 0 for positive and 1 for negative. Example the different representations of -9 using 8 bit number: Table 1.3 lists all possible four-bit signed binary numbers in the three representations.

Signed Binary Numbers

Signed Binary Numbers Arithmetic Addition When adding two numbers in the signed magnitude system we follow the following rules: If the signs are the same, add the two magnitudes, and give the sum the common sign. If the signs are different, subtract the smaller magnitude from the larger magnitude, give the difference the sign of the larger magnitude. When adding two signed binary numbers in signed 2`s complement system, we follow the following rule : Add the two numbers, including the sign bits. A carry out of the sign bit is discarded. We need to make sure that the result has sufficient number of bits to accommodate the sum. If adding two n bits numbers requires n+1 bits for the result, this is called overflow.

Signed Binary Numbers Arithmetic Subtraction Example: In 2’s-complement form: Example: Take the 2’s complement of the subtrahend (including the sign bit) and add it to the minuend (including sign bit). A carry out of sign-bit position is discarded. ( 6)  ( 13) (11111010  11110011) (11111010 + 00001101) 00000111 (+ 7)

Outline of Chapter 1 (Part c) 1.6 Signed Binary Numbers 1.7 Binary Codes

1.7 Binary Codes Any discrete element of information that distinct among a group of quantities can be represented with a binary code. An n bit binary code is a group of n bits that assumes up to 2n distinct combinations of 1 and 0. The minimum number of bits required to code 2n distinct quantities is n, there is no maximum number of bits that may be used for a binary code. Example: A set of 4 elements could be coded with 2 bits having the following assignments 00,01,10,11. A set of 8 elements will need 3 bits.

1.7 Binary Codes BCD Code A number with k decimal digits will require 4k bits in BCD. Decimal 396 is represented in BCD with 12bits as 0011 1001 0110, with each group of 4 bits representing one decimal digit. A decimal number in BCD is the same as its equivalent binary number only when the number is between 0 and 9. The binary combinations 1010 through 1111 are not used and have no meaning in BCD.

Binary Code Example: BCD addition Consider decimal 185 and its corresponding value in BCD and binary: BCD addition

Binary Code Example: Decimal Arithmetic: (+375) + (-240) = +135 Consider the addition of 184 + 576 = 760 in BCD: Decimal Arithmetic: (+375) + (-240) = +135 Hint 6: using 10’s of BCD

Binary Codes Other Decimal Codes

Binary Codes Gray code Only one bit in the code group Changes in going from one number to the next number. Used in applications in which the normal system of binary numbers may produce an error or ambiguity during the transition from one number to the next.

Reading Chapter 1: 1.6,1.7