Lecture 1.2 (Chapter 1) Prepared by Dr. Lamiaa Elshenawy

Slides:



Advertisements
Similar presentations
Lecture - 2 Number systems and computer data formats
Advertisements

Company LOGO Edit your slogan here DKT 122/3 DIGITAL SYSTEM 1 WEEK #3 NUMBER SYSTEMS, OPERATION & CODES (PART 2)
Binary Systems1 DIGITAL LOGIC DESIGN by Dr. Fenghui Yao Tennessee State University Department of Computer Science Nashville, TN.
COE 202: Digital Logic Design Signed Numbers
A digital system is a system that manipulates discrete elements of information represented internally in binary form. Digital computers –general purposes.
ENGIN112 L4: Number Codes and Registers ENGIN 112 Intro to Electrical and Computer Engineering Lecture 4 Number Codes and Registers.
ECE 331 – Digital System Design
Chapter 1 Binary Systems 1-1. Digital Systems
CS 151 Digital Systems Design Lecture 4 Number Codes and Registers.
VIT UNIVERSITY1 ECE 103 DIGITAL LOGIC DESIGN CHAPTER I NUMBER SYSTEMS AND CODES Reference: M. Morris Mano & Michael D. Ciletti, "Digital Design", Fourth.
S. Barua – CPSC 240 CHAPTER 2 BITS, DATA TYPES, & OPERATIONS Topics to be covered are Number systems.
A digital system is a system that manipulates discrete elements of information represented internally in binary form. Digital computers –general purposes.
Data Representation – Chapter 3 Sections 3-2, 3-3, 3-4.
Data Storage. SIGN AND MAGNITUDE Storing and representing numbers.
Mantıksal Tasarım – BBM231 M. Önder Efe
1.6 Signed Binary Numbers.
Dr. Bernard Chen Ph.D. University of Central Arkansas
Digital Systems and Binary Numbers
EKT 121 / 4 ELEKTRONIK DIGIT 1 CHAPTER 1 : INTRODUCTION.
Binary Codes Computers and other digital systems "work" with binary numbers. I/P & O/P is usually done using decimal numbers, alphabetics, special symbols.
Logic and Digital System Design - CS 303
Chapter 3 Data Representation
Dept. of Computer Science Engineering Islamic Azad University of Mashhad 1 DATA REPRESENTATION Dept. of Computer Science Engineering Islamic Azad University.
Binary Arithmetic & Data representation
EX_01.1/46 Numeric Systems. EX_01.2/46 Overview Numeric systems – general, Binary numbers, Octal numbers, Hexadecimal system, Data units, ASCII code,
ECEN2102 Digital Logic Design Lecture 1 Numbers Systems Abdullah Said Alkalbani University of Buraimi.
Digital Logic Design Lecture 3 Complements, Number Codes and Registers.
Yuh-Jzer JoungDigital Systems1 Number Systems decimal number : 7397=7× × × ×10 0 a 4 a 3 a 2 a 1 a 0. a -1 a -2 = a 4 ×10 4 +a 3 ×10.
Logic Design Dr. Yosry A. Azzam. Binary systems Chapter 1.
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.
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.
Mohammad Amin Kuhail M.Sc. (York, UK) University of Palestine Faculty of Engineering and Urban planning Software Engineering Department Digital Logic Design.
ECE 331 – Digital System Design Representation and Binary Arithmetic of Negative Numbers and Binary Codes (Lecture #10) The slides included herein were.
Digital Systems and Binary Numbers
Digital Circuits Text Book –M. M. Mano, "Digital Design," 3rd Ed., Prentice Hall Inc., Reference –class notes Grade –quizzes:15% –mid-term:27.5%
Tutorial: ITI1100 Dewan Tanvir Ahmed SITE, UofO
ECE 301 – Digital Electronics Representation of Negative Numbers, Binary Arithmetic of Negative Numbers, and Binary Codes (Lecture #11) The slides included.
Chapter 1 Digital Systems and Binary Numbers
Digital Fundamentals Tenth Edition Floyd Chapter 2 © 2008 Pearson Education.
MECH1500 Chapter 3.
Module 2.  In Module 1, we have learned basic number representation which include binary, octal, hexadecimal and decimal.  In digital systems, numbers.
Orange Coast College Business Division Computer Science Department CS 116- Computer Architecture Logic Design: Part 1.
Chapter 1: Binary Systems
Chapter 1 Number Systems Digital Electronics. Topics discussed in last lecture Digital systems Advantages of using digital signals over analog. Disadvantages.
NUMBER SYSTEMS AND CODES. CS Digital LogicNumber Systems and Codes2 Outline Number systems –Number notations –Arithmetic –Base conversions –Signed.
CPEN Digital Logic Design Binary Systems Spring 2004 C. Gerousis © Digital Design 3 rd Ed., Mano Prentice Hall.
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.
Exercise 1.2 (Chapter 1) Prepared by Dr. Lamiaa Elshenawy
Nguyen Le CS147.  2.4 Signed Integer Representation  – Signed Magnitude  – Complement Systems  – Unsigned Versus Signed Numbers.
BINARY SYSTEMS ENGR. KASHIF SHAHZAD 1. BINARY NUMBERS 1/2 Internally, information in digital systems is of binary form groups of bits (i.e. binary numbers)
Digital Logic Design Ch1-1 Chapter 1 Digital Systems and Binary Numbers Mustafa Kemal Uyguroğlu Digital Logic Design I.
Logic Design (CE1111 ) Lecture 4 (Chapter 4) Combinational Logic Prepared by Dr. Lamiaa Elshenawy 1.
Exercises 1.2 (Chapter 1) Prepared by Dr. Lamiaa Elshenawy
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.
Chapter 1 Digital Systems and Binary Numbers
Speaker: Fuw-Yi Yang 楊伏夷 伏夷非征番, 道德經 察政章(Chapter 58) 伏者潛藏也
CHAPTER 1 : INTRODUCTION
Data Transfer ASCII FILES.
Digital Systems and Binary Numbers
Chapter 3 Data Representation
Chapter 1 Digital Systems and Binary Numbers
BEE1244 Digital System and Electronics BEE1244 Digital System and Electronic Chapter 2 Number Systems.
INTRODUCTION TO LOGIC DESIGN Chapter 1 Digital Systems and Binary Numbers gürtaçyemişçioğlu.
Data Representation Data Types Complements Fixed Point Representation
Digital Systems and Binary Numbers
ECE 331 – Digital System Design
Computer Architecture CST 250
Presentation transcript:

Lecture 1.2 (Chapter 1) Prepared by Dr. Lamiaa Elshenawy Logic Design (CE1111) Lecture 1.2 (Chapter 1) Prepared by Dr. Lamiaa Elshenawy

Outlines Digital Systems Binary Numbers Number-Base Conversions Octal and Hexadecimal Numbers Complements of Numbers Signed Binary Numbers Binary Codes Binary Storage and Registers Binary Logic

Complements of Numbers Complements are used in digital computers to simplify the subtraction operation and for logical manipulation Simplifying operations leads to simpler, less expensive circuits to implement the operations

Complements of Numbers Types of complements Radix complement (r’s complement) Diminished radix complement ((r-1)’s complement) Decimal Numbers 10’s complement and 9’s complement Binary Numbers 2’s complement and 1’s complement

Complements of Numbers How can we calculate r’s complement and (r-1)’s complement ? Radix complement 𝑟 𝑛 −𝑁 Diminished radix complement 𝑟 𝑛 −1 −𝑁 Where n is number of digits

Complements of Numbers Calculate the 10’s complement and 9’s complement of 546700. Solution 10’s complement: 1000000 - 546700=453300 9’s complement: 999999 - 546700=453299

Complements of Numbers Calculate the 2’s complement and 1’s complement of 1011000. Hint Solution 2’s complement: 1011000 0101000 1’s complement: 1011000 0100111 2’s complement: leave all least significant 0’s and first 1 unchanged, change from 0 to 1 or from 1 to 0 for all other higher significant digits 1’s complement: change from 0 to 1 or from 1 to 0

Signed Binary Numbers Leftmost position of the number used for sign: Bit 0 Positive number Bit 1 Negative number Example (+9)10 =(01001) signed-magnitude representation (-9)10 =(11001) 2 signed-magnitude representation (-9)10 =(10110) 2 signed-1’s complement representation (-9)10 =(10111) 2 signed-2’s complement representation

Arithmetic Addition Unsigned numbers: As ordinary arithmetic Example 25+12=37 13+ −30 =− 30−13 =−17 Signed numbers: Positive numbers as ordinary arithmetic +25 + +12 =+37 Negative numbers Write negative number in signed-2’s complement Discard the end carry

Arithmetic Addition Example

Arithmetic Subtraction Unsigned numbers: As ordinary arithmetic Example 27−14=13 15− −30 =15+ 30 =45 Signed numbers:

Arithmetic Subtraction Example −6 − −13 =−6+13=+7 −6 10=(1000 0110)2 =(1111 1010)2 (signed-2’s complement) +13 10=(0000 1101)2 1111 1010 0000 1101 𝟏0000 𝟎𝟏𝟏𝟏 =+7 Discard

Binary Codes What is a binary code? An n‐bit binary code is a group of n bits that assumes up to 2 𝑛 distinct combinations of 1’s and 0’s to represent one element that is being coded. Why we use binary codes? Because digital systems understands only 1 or 0

Binary Codes What are the most common binary codes? Binary-Coded Decimal (BCD) 2421-Code Excess-3 Code 8,4,-2,-1 Code Gray Code ASCII Character Code

Binary-Coded Decimal Converts Decimal Numbers Binary Numbers How? Write each decimal digits in 4bits Example

Binary-Coded Decimal

Signed-BCD Addition Write each decimal number in BCD Write sign in the leftmost position (0 for +, 1 for -) Add (6) 10=(0110) 2 to the binary sum If 𝑠𝑢𝑚≥ (1010) 2 Example

ASCII Character Code It codes 128 Characters in7-bits 26 capital letters 26 small letters 10 decimal digits Special characters ASCII: American Standard Code for Information Interchange

Registers What is a register? A register is a group of binary cells. A register with n cells can store any discrete quantity of information that contains n bits

Register Transfer

Information Processing

Binary Logic What is a binary logic? Binary logic consists of binary variables and a set of logical operations Variables are designated by letters of the alphabet, such as A, B, C, x, y, z, etc., with each variable having two and only two distinct possible values: 1 and 0

Binary Logic What are the most common logic gates? AND: 𝑥.𝑦=𝑥 𝐴𝑁𝐷 𝑦=𝑧 OR: 𝑥+𝑦=𝑥 𝑂𝑅 𝑦=𝑧 NOT: 𝑥 ′ = 𝑥 =𝑧

Binary Logic

Thank you for your attention