Logic Design Dr. Yosry A. Azzam. Binary systems Chapter 1.

Slides:



Advertisements
Similar presentations
Binary Systems1 DIGITAL LOGIC DESIGN by Dr. Fenghui Yao Tennessee State University Department of Computer Science Nashville, TN.
Advertisements

A digital system is a system that manipulates discrete elements of information represented internally in binary form. Digital computers –general purposes.
Chapter 1 Digital Systems and Numbers System
Chapter 1 Binary Systems 1-1. Digital Systems
Digital Fundamentals Floyd Chapter 2 Tenth Edition
VIT UNIVERSITY1 ECE 103 DIGITAL LOGIC DESIGN CHAPTER I NUMBER SYSTEMS AND CODES Reference: M. Morris Mano & Michael D. Ciletti, "Digital Design", Fourth.
Information Representation and Number Systems BIL- 223 Logic Circuit Design Ege University Department of Computer Engineering.
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
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd.
Programmable Logic Controllers
ES 244: Digital Logic Design Chapter 1 Chapter 1: Introduction Uchechukwu Ofoegbu Temple University.
ACOE1611 Data Representation and Numbering Systems Dr. Costas Kyriacou and Dr. Konstantinos Tatas.
EKT 121 / 4 ELEKTRONIK DIGIT 1 CHAPTER 1 : INTRODUCTION.
©zaher elsir Sudan Academy for Banking & Financial Sciences Decimal Number System Base (Radix)10 Digits0, 1, 2, 3, 4, 5, 6, 7, 8, 9 e.g The magnitude.
Logic and Digital System Design - CS 303
1 Digital Technology and Computer Fundamentals Chapter 1 Data Representation and Numbering Systems.
Chapter 3 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,
1 Digital Systems and Binary Numbers EE 208 – Logic Design Chapter 1 Sohaib Majzoub.
EE2174: Digital Logic and Lab Professor Shiyan Hu Department of Electrical and Computer Engineering Michigan Technological University CHAPTER 2 Number.
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.
Information Representation. Digital Hardware Systems Digital Systems Digital vs. Analog Waveforms Analog: values vary over a broad range continuously.
مدار منطقي مظفر بگ محمدي Course Structure & Grading Homework: 25% Midterm: 30% Final:50% There is 5% extra! ( =105!) Textbook:
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.
ECE 301 – Digital Electronics Unsigned and Signed Numbers, Binary Arithmetic of Signed Numbers, and Binary Codes (Lecture #2)
Chapter 1: Digital Computers and Information Illustration at beginning of each Chapter Base 10 Binary Base 2 Octal Base 8 Hex bas
1 Lect # 1 Binary Systems Digital vs. Analog Analog – a continuous range of values Digital – a discrete set of values –Like money –Can’t get smaller than.
Data Representation, Number Systems and Base Conversions
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
WEEK #2 NUMBER SYSTEMS, OPERATION & CODES (PART 1)
Number Systems by Dr. Amin Danial Asham. References  Programmable Controllers- Theory and Implementation, 2nd Edition, L.A. Bryan and E.A. Bryan.
Chapter 1 Digital Systems and Binary Numbers
Digital Fundamentals Tenth Edition Floyd Chapter 2 © 2008 Pearson Education.
MECH1500 Chapter 3.
D IGITAL C IRCUITS Book Title: Digital Design Edition: Fourth Author: M. Morris Mano 1.
Chapter 1: Binary Systems
CPEN Digital Logic Design Binary Systems Spring 2004 C. Gerousis © Digital Design 3 rd Ed., Mano Prentice Hall.
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.
CSC 331: DIGITAL LOGIC DESIGN COURSE LECTURER: E. Y. BAAGYERE. CONTACT: LECTURE TIME: 15:40 – 17:45 hrs. VENUE: SP-LAB.
ECE DIGITAL LOGIC LECTURE 4: BINARY CODES Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 01/26/2016.
Lecture 1.2 (Chapter 1) Prepared by Dr. Lamiaa Elshenawy
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.
Dr. Nermin Hamza. Agenda Signed Numbers Properties of Switching Algebra.
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.
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
CHAPTER 1 : INTRODUCTION
Digital Systems and Binary Numbers
Chapter 3 Data Representation
Chapter 1 Digital Systems and Binary Numbers
Fundamentals & Ethics of Information Systems IS 201
University of Gujrat Department of Computer Science
2 Number Systems and Codes Edited by Jerry Bernardini.
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.
Digital Electronics & Logic Design
Diminished Radii Complement and codes
Digital Logic Design (ECEg3141) 2. Number systems, operations & codes 1.
Digital Systems and Binary Numbers
Table 1.1 Powers of Two.
Presentation transcript:

Logic Design Dr. Yosry A. Azzam

Binary systems Chapter 1

3 §Agenda Binary Systems : Binary Numbers, Binary Codes, Binary Logic §ASCII Code (American Standard Code for Information Interchange) §Boolean Algebra (Basic Theorems, Property of Boolean Algebra, Boolean Functions) §Logic Gates §Readings l Mano: Ch 1 & 2 (until 2-4) §Objectives l Understand Bit & Byte as the foundation of data representation Understand the Binary System, it ’ s operations, conversions and negative number representation l Understand the Logic Gates & Binary Logics, which they based on

4 Data Representation §The complex computer system is built on a 2-states system (on/off) : The Binary System. §Binary system is a 2 base numbering system: 0 and 1  Each 0 and 1 is called “ BIT ” (BInary digiT)

5 Bits & Bytes §Bit (0 or 1) l Off/On for positive logic l On/Off for negative logic Dec (Bin) §0 (0000) §1 (0001) §2 (0010) §3 (0011) §4 (0100) §5 (0101) §6 (0110) §7 (0111) § 8 (1000) § 9 (1001) § 10 (1010) § 11 (1011) § 12 (1100) § 13 (1101) § 14 (1110) § 15 (1111)

6 Bits & Bytes (cont ’ d) §Byte : a group of 8 bits, r epresent : l ASCII characters (1 byte is 1 character) Refer to ASCII Table p : 23 l Unicode l There are other format of data representation discussed later in the course. §A ( ) §B ( )  … §Z ( )  … §0 ( ) §1 ( )  … §9 ( )

7 Binary Systems §Binary Numbers §Binary Codes §Binary Logic

8 Binary and Decimal Numbers §Binary l 1010 = 1x x x x2 0 0, 1, 10, 11 … Called “ Base-2 ” §Decimal l 7392 = 7x x x x10 0 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 … Called “ Base-10 ” §Octal l Based-8 : (0, 1, 2, 3, 4, 5, 6, 7) §Hexadecimal l Based-16 : (0, 1, 2, 3, 4, 5, 6, 7, 8,9,A,B,C,D,E,F) Reading : Mano. Chapter 1

9 Binary Systems and Number Base Conversion: Decimal Numbers (Base-10): 0,1,2,3,4,5,6,7,8, and 9Ten Digits Binary Numbers (Base-2): 0 and 1 Two Digits Octal Numbers (Base-8):0..7 Eight Digits Hexadecimal No. (Base-16): 0,…,9,A,B,C,D,E,F16 Digits and so on.

Number Base Conversion ( 1): (7392) 10 = 7x x x x10 0 (2): ( ) 2 = 1x2 3 +0x2 2 +1x2 1 +0x2 0 +0x x x2 -3 =(10.375) 10 (3): (4021.2) 5 = 4x5 3 +0x5 2 +2x5 1 +1x5 0 +2x5 -1 = (511.4) 10 (4): Convert decimal 41 to binary, i.e., (41) 10 = ( ¿?) 2 Solution:

11 OR= Divide by 2Integer quotent RemainderCoefficient 41/2=20+11LSB 20/2= /2= /2= /2= /2= 0+11MSB

12 (5): Convert (0.6875) 10 to binary. §Answer: (0.6875) 10 = (0.1011) 2 Divide by 2Remainder LSB MSB 01  Answer= Multiply by 2Integer quotientfractionCoefficient x2= MSB x2= x2= x2= LSB

13 (6): Convert decimal 153 to octal, i.e., (153) 10 = ( ¿?) 8 Solution: Divide by 8Remainder LSB 23 02MSB  Answer=231  (153) 10 = ( 231) 8

14 (7): Convert (0.513) 10 to octal, to seven significant figures Multiply by 8Integer quotientfractionCoefficient 0.513x8= MSB 0.104x8= x8= x8= x8= x LSB Answer: (0.513) 10 = ( …..) 8

15 (8): Convert decimal to octal, since we know that (153) 10 = ( 231) 8 and (0.513) 10 = ( ) 8 Then ( ) 10 = ( ) Octal and Hexadecimal Numbers Since 2 3 =8 and 2 4 =16, each octal digit corresponds to three binary digits and each hexadecimal digit corresponds to four binary digits. Examples: convert the binary to octal. Answer: ( ) 2 = ( ) 8 convert the binary to Hexadecimal Answer: ( ) 2 = ( 2 C 6 B. F 0 6 ) 16

16 Binary Numbers : Conversions 2 §Octal (2 3 = 8) l ( ) 2 l ( ) 8 §Hexadecimal (2 4 = 16) l ( ) 2 l (2C6B.F06) C 6 B. F 0 6

17 Binary Numbers : Operations §Summation §Multiplication §Subtraction

18 Two’s complement notation systems

19 Diminished Radix Complements §Complements are used in digital computers for simplifying the subtraction operation and for logical manipulation. §Given a number N in base r having n digits, the (r-1)’s complement of N is defined as (r n -1) –N §For decimal numbers, r = 10 and r-1 =9 So, §The 9’s complement of N is (10 n -1)-N = N §For binary numbers, r=2 and r-1=1 so, §The 1’s complement of N is (2 n -1)-N=111…111-N

20 Radix Complements §The radix complement of an n-digit number N in base r is defined as r n -N for N≠0 and 0 for N=0. i.e. the radix complement= diminished radix complement +1

21 Complements §The complement of is 9 ’ s complement (diminished radix complement) (999999) 10 -(012398) 10 = (987601) ’ s complement (radix complement) (987602) 10 = (987601) =(987602) 10 or: ( ) 10 -(012398) 10 =(987602) 10 §The complement of is 1 ’ s complement (diminished radix complement) l ( ) 2 - ( ) 2 = 2 ’ s complement (radix complement) l ( ) 2 - ( ) 2 =

22 Complements (cont ’ d.) The (r-1)’s complement of octal or hexadecimal numbers is obtained by subtracting each digit from 7 or F (decimal 15) respectively

Examples: (1): 10’s complement of (52520) 10 = 10 5 – =47480 (2): 10’s complement of (246700) 10 is (3): 10’s complement of (0.3267) 10 = = (4): 2’s complement of (101100) 2 =(2 6 ) 10 -(101100) 2 =( ) 2 -(101100) 2 =(010100) 2 (5): 2’s complement of (0.0110) 2 =(2 0 ) 10 -(0.0110) 2 =( ) 2 =(0.1010) 2.

24 Subtraction with Complement  10 ’ s complement Subtract – 3250  2 ’ s complement l Subtract ’s complement: Sum: Remove end carry: Answer: ’s complement: Sum: Remove end carry: Answer:

25 Signed Binary Numbers 1  Due to hardware limitation of computers, we need to represent the negative values using bits. Instead of a “ + ” and “ - ” signs. §Conventions: l 0 for positive l 1 for negative

26 Signed Binary Numbers 2 §(9) 10 = ( ) 2 §1. Signed magnitude (used in ordinary arithmetic): l (-9) 10 = ( ) 2 Changing the first “ sign bit ” to negative  2. Signed 1 ’ s complement: l (-9) 10 = ( ) 2 l Complementing all bits including sign bit  3. Signed 2 ’ s complement: l (-9) 10 = ( ) 2 Taking the 2 ’ s complement of the positive number

27 Signed Binary Numbers 3

28 Arithmetic Addition and Subtraction

29 Binary Logic §Binary Logic: Consists of Binary Variables and Logical Operations §Basic Logical Operations: l AND l OR l NOT §Truth tables: Table of all possible combinations of variables to show relation between values

30 Logical Operation: AND  Value “ 1 ” only if all inputs are “ 1 ” §Acts as electrical switches in series  Denote by “. ” XYX.Y

31 Logical Operation: OR  Value “ 1 ” if any of the inputs is “ 1 ” §Acts as electrical switches in parallel  Denote by “ + ” XYX+Y

32 Logical Operation: NOT §Reverse the value of input  Denote by complement sign ( !x or x ’ or x ).  Also called “ inverter ” X X’X’ 01 10

33 Logic Gates §Is electronic digital circuits (logic circuits) [Mano p.29-30]  Is blocks of hardware Called “ digital circuits ”, “ switching circuits ”, “ logic circuits ” or simply “ gates ”

34 X-OR Gates

35 Input-Output Signals

36 Binary Signals Levels §Acceptable level of deviation §Nominal level §State of transition Volts Logic 1 Logic 0

37 Positive and negative logic

38 BCD Code §Although the binary number system is the most natural system for a computer, most people are more accustomed to decimal system. §Convert decimal numbers to binary, perform all arithmetic calculations in binary and then convert the binary results back to decimal.  So, we represent the decimal digits by means of a code that contains 1 ’ s and 0 ’ s. §Also possible to perform the arithmetic operations directly with decimal numbers when they are stored in coded form.

39 BCD Code §Ex1: BCD for (396) 10 is ( ) BCD §Ex2: (185) 10 =( ) BCD = ( ) 2 §So, the BCD has 12 bits, but binary equivalent has 8 bits

40 BCD Addition § Binary Carry Binary sum Add BCD sum

41 Decimal Arithmetic of BCD §Add (+375) + (-240)= Complement of Discard the end carry The 9 in the leftmost position of the second number represents a minus

42 Other Decimal Codes

43 Gray Code BinaryReflected Code (Gray code) Decimal Digit bit change … bit change

44 ASCII Character Code §The ASCII (American Standard Code for Information Interchange) l 7 bits per character to code 128 characters including special characters ($ = ) l It uses 94 graphic characters that can be printed and 34 non-printing characters used for control functions. l There are 3 types of control characters: format effectors, information separators, and communication control characters.

45 ASCII Character Code

46 ASCII Control Characters

47 §Although ASCII code is a 7-bit code, ASCII characters are most often stored one per byte. §The extra bit are used for other purposes, depending on the application. §For Ex., some printers recognize 8-bit ASCII characters with the MSB set to 0. §Additional bit characters with the MSB set to 1 are used for other symbols such as the Greek alphabet or italic type font. ASCII Character Code (Contd.)

48 Error Detecting Code §To detect errors in data communication and processing, the eighth bit is used to indicate parity. §This parity bit is an extra bit included with a message to make the total number of 1’s either even or odd. with even parity with odd parity §Ex: ASCII A = ASCII T =

49 The ASCII codes for the letters A and F adjusted for odd parity

50 Transfer of information with registers

51 Example of Binary information system

52 Exercises l Problem 1-2 l Problem 1-3 l Problem 1-10 l Problem 1-16 l My Advise : Do all problems p: 30-31,