Download presentation

Presentation is loading. Please wait.

Published byMarcus Richard Modified over 4 years ago

1
CPS-304 DIGITAL LOGIC & DESIGN Instructor : Ms. Saba Iqbal

2
Textbook – Digital Design by Morris Mano, 2 nd Edition/ 3rd Edition/Digital Fundamentals.

3
Introduction to concepts of digital logic, gates, and the digital circuits Design and analysis of combinational and sequential circuits Basics of logic design of computer hardware What’s Course About?

4
Binary Systems Binary Algebra Simplification of Boolean Functions Combinational Logic Sequential Logic MSI Sequential Circuits Course Outline

5
Digital Computer follow a sequence of instructions, Digital System play a prominent role in this digital age – Communication, medical treatment, internet, DVD, CD, Space,Programme.Scientific &Educational field,ATC commercial etc. – called programs, that operate on given data – User can specify and change program or data according to needs Like Digital Computers, most digital devices are programmable Digital Systems have the ability to Manipulate discrete elements of information. – Any set that is restricted to a finite number of elements contains discrete information 10 Decimal digits 26 Alphabet letters 52 Playing cards 64 squares of a chessboard Digital Systems

6
Digital Systems can do hundreds of millions of operations per second Extreme reliability due to error-correcting codes A Digital System is interconnection of digital modules To understand Digital module, we need to know about digital circuits and their logical functions Hardware Description Language (HDL) is a programming language that is suitable for describing digital circuit in a textual form – Simulate a digital system to verify operation before it is built Digital Systems

7
7 COMPUTER Analog Computer,. It responds to continuous signals. Digital computer. It responds to 0 and 1. also called Binary. Main Modules. Memory Unit Processor Unit Control Unit Input Device / Output Device CPU Processor combined with Control Unit Micro Processor. CPU in a Small integrated circuit CPU combined with Memory and Interface control for i/p and o/p devices form a micro computer.

8
Fetch Time. Getting data and instructions from ALU and then issue command Fix time Execute Time. ALU carries out execution Time is variable Master clock. It is in control unit and control all functions Memory – RAM Semi conductor memory & Ferrite core memory – Sequential Memory. Mag tape, mag disk, CD Floppy Mag Drum. each info has a location and an address. 8 DATA FLOW

9
– Random Access Memory,. Access time to a location is constant. – Sequential access memory. Access time to all locations are different – Main memory and Secondary memory. How we store Semi conductor Magnetic Material Binary Req. as material can store only 1 and 0 – Three things are stored, Instructions, Data, Address. 9 DEFINATIONS MEMORY

10
7,392= 7x10 3 + 3x10 2 + 9x10 1 + 2x10 0 – Thousands, hundreds, etc…power of 10 implied by position of coefficient Generally a decimal number is represented by a series of coefficients – a 6 a 5 a 4 a 3 a 2 a 1 a 0. a -1 a -2 a -3 a -4 a j cofficient are any of the 10 digit (0,1,2…9) Decimal number are base 10 Decimal Number

11
Digital Systems manipulate discrete quantities of information in binary form – Operands in calculations – Decimal Digits – Results Strings of binary digits (“bits”) Two possible values 0 and 1 Binary Number

12
Each digit represents a power of 2 Coefficient have two possible values 0 and 1 Strings of binary digits (“bits”) – n bits can store numbers from 0 to 2 n -1 – n bits can store 2 n distinct combinations of 1’s and 0’s Each coefficient a j is multiplied by 2 j So 101 binary is 1 x 2 2 + 0 x 2 1 + 1 x 2 0 or 1 x 4 + 0 x 2 + 1 x 1 = 5 Binary Numbers

13
A bit (short for binary digit) is the smallest unit of data in a computer. – A bit can hold only one of two values: 0 or 1, corresponding to the electrical values of off or on, respectively. – Because bits are so small, you rarely work with information one bit at a time – A byte is a unit of measure for digital information. – A single byte contains eight consecutive bits Binary Arithmetic. Addition, Subtraction Multiplication Give example BITs & Bytes

14
GATES

15
Octal Octal is base 8 A number is represented by a series of coefficients – a 6 a 5 a 4 a 3 a 2 a 1 a 0. a -1 a -2 a -3 a -4 a j cofficient are any of 8 digit (0,1,2…7) Need 3 bits for representation Example: (127.4) 8 = 1 X 8 2 +2 X 8 1 +7 X 8 0 + 4 X 8 -1 64+16+7+.5= (87.5) 10 DecBinOctal 00000 10011 20102 30113 41004 51015 61106 71117 81000- 91001-

16
Hexadecimal Hexadecimal is base 16 A number is represented by a series of coefficients – a 6 a 5 a 4 a 3 a 2 a 1 a 0. a -1 a -2 a -3 a -4 a j cofficient are any of 16 digit (0,1,2,3,4,5,6,7,8, 9,A,B,C,D,E,F) Need 4 bits for representation (B65F) 16 11 X 16 3 +6 X 16 2 + 5 X 16 1 +15 X 16 0 = 11x4096 + 6x256 +5x16 +15 = 45056 + 1536 + 80 +15 = 46,687 DecBinHex 000000 100011 200102 300113 401004 501015 601106 701117 810008 910019 101010a 111011b 121100c 131101d 141110e 151111f

17
Easy, just multiply digit by power of 2 Just like a decimal number is represented Example follows Converting Binary to Decimal

18
10011100 Binary Decimal Example 76543210 2727 2626 2525 2424 23232 2121 2020 1286432168421 128 + 0 + 0 + 16 + 8 + 4 + 0 + 0 = 156 What is 10011100 in decimal?

19
A little more work than binary to decimal Some examples – 3 = 2 + 1 = 11 (that’s 12 1 + 12 0 ) – 5 = 4 + 1 = 101 (that’s 12 2 + 02 1 + 12 0 ) Decimal to Binary

20
1.Find largest power-of-two smaller than decimal number 2.Make the appropriate binary digit a ‘1’ 3.Subtract the power of 2 from decimal 4.Do the same thing again Algorithm – Decimal to Binary

21
Convert 28 decimal to binary Decimal Binary Example 76543210 2727 2626 2525 2424 23232 2121 2020 1286432168421 32 is too large, so use 16 Binary 10000Decimal 28 – 16 = 12 Binary 11000Decimal 12 – 8 = 4 Next is 8 Binary 11100Decimal 4 – 4 = 0 Next is 4

22
Convert decimal 0.6875 to binary IntegerFractionCoefficient 0.6875 X 2= 10.3750a -1 =1 0.3750 X 2= 00.7500a -2 =0 0.7500 X 2= 10.5000a -3 =1 0.5000 X 2= 10.0000a -4 =1 (0.6875) 10 = (0.1011) 2 Decimal Binary (Fraction)

23
Similar to decimal binary. 1.Find largest power-of-8 smaller than decimal number 2.Divide by power-of-8. The integer result is Octal digit. 3.The remainder is new decimal number. 4.Do the same thing again Decimal to Octal

24
Convert decimal 153 to Octal Decimal Octal 1533210 19 18383 8282 8181 8080 2020 3232 512648 1 512 is too large, so use 64 Octal 200Decimal 153 – 64X2 = 25 Octal 230 Decimal 25 – 8X3= 1 Next is 8 Octal 231 Decimal 1 – 1X1 = 0 Next is 1

25
Convert decimal 0.513 to Octal IntegerFractionCoefficient 0.513 X 8 = 4+0.104a -1 =4 0.104 X 8 = 0+0.832a -2 =0 0.832 X 8 = 6+0.656a -3 =6 0.656 X 8 = 5+0.248a -4 =5 0.248 X 8 = 1+0.984 a -5 =1 0.984 X 8 = 7+0.872 a -5 =7 (0.513) 10 = (0.406517) 8 Decimal Octal (Fraction)

26
Partition Binary number into group of three digits each The corresponding octal digit is then assigned to each group (10 110 001 101 011. 111 100 000 100) 2 (10 110 001 101 011. 111 100 000 100) 2 = (26153.7460) 8 Binary to Octal

27
Each Octal digit is converted to its three digit binary equivalent (26153.7460) 8 = (010 110 001 101 011. 111 100 000 100) 2 Octal to Binary

28
Convention – write 0x before number Hex to Binary – just convert digits Hex to Binary BinHex 00000 00011 00102 00113 01004 01015 01106 01117 10008 10019 1010a 1011b 1100c 1101d 1110e 1111f 0x2ac 001010101100 0x2ac = 001010101100 No magic – remember hex digit = 4 bits

29
Just convert groups of 4 bits Binary to Hex BinHex 00000 00011 00102 00113 01004 01015 01106 01117 10008 10019 1010a 1011b 1100c 1101d 1110e 1111f 101001101111011 1011 537b 101001101111011 = 0x537b 0101 0111 0011

30
Just multiply each hex digit by decimal value, and add the results. Hex to Decimal 16 3 16 2 16 1 16 0 4096256161 0x2ac 2 256 + 10 16 + 12 1 = 684 DecHex 00 11 22 33 44 55 66 77 88 99 10a 11b 12c 13d 14e 15f

31
Similar to decimal binary. 1.Find largest power-of-16 smaller than decimal number 2.Divide by power-of-16. The integer result is hex digit. 3.The remainder is new decimal number. 4.Do the same thing again Decimal to Hex

32
16 3 16 2 16 1 16 0 4096256161 DecHex 00 11 22 33 44 55 66 77 88 99 10a 11b 12c 13d 14e 15f 684 684/256 = 2 0x2__ 684%256 = 172 172/16 = 10 = a 0x2a_ 172%16 = 12 = c 0x2ac

Similar presentations

© 2020 SlidePlayer.com Inc.

All rights reserved.

To make this website work, we log user data and share it with processors. To use this website, you must agree to our Privacy Policy, including cookie policy.

Ads by Google