1 / 32

CPS-304 DIGITAL LOGIC & DESIGN

CPS-304 DIGITAL LOGIC & DESIGN. Instructor : Ms. Saba Iqbal. Textbook Digital Design by Morris Mano , 2 nd Edition/ 3rd Edition/Digital Fundamentals. What’s Course About?. Introduction to concepts of digital logic, gates, and the digital circuits

bary
Télécharger la présentation

CPS-304 DIGITAL LOGIC & DESIGN

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

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

  3. What’s Course About? • 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

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

  5. Digital Systems • 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

  6. Digital Systems • 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

  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. DATA FLOW • 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.

  9. DEFINATIONS MEMORY • 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.

  10. Decimal Number • 7,392= 7x103 +3x102 + 9x101 + 2x100 • Thousands, hundreds, etc…power of 10 implied by position of coefficient • Generally a decimal number is represented by a series of coefficients • a6 a5 a4 a3 a2 a1 a0.a-1 a-2 a-3 a-4 • aj cofficient are any of the 10 digit (0,1,2…9) • Decimal number are base 10

  11. Binary Number • 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

  12. Binary Numbers • 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 2n-1 • n bits can store 2n distinct combinations of 1’s and 0’s • Each coefficient aj is multiplied by 2j • So 101 binary is 1 x 22 + 0 x21 + 1 x 20 or 1 x 4 + 0 x 2 + 1 x 1 = 5

  13. BITs & Bytes • 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

  14. GATES

  15. Octal • Octal is base 8 • A number is represented by a series of coefficients • a6 a5 a4 a3 a2 a1 a0.a-1 a-2 a-3 a-4 • aj cofficient are any of 8 digit (0,1,2…7) • Need 3 bits for representation • Example: (127.4)8= 1 X 82 +2 X 81 +7 X 80 + 4 X 8-1 64+16+7+.5= (87.5)10

  16. Hexadecimal • Hexadecimal is base 16 • A number is represented by a series of coefficients • a6 a5 a4 a3 a2 a1 a0.a-1 a-2 a-3 a-4 • aj 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 163 +6 X 162 + 5 X 161 +15 X 160 = 11x4096 + 6x256 +5x16 +15 = 45056 + 1536 + 80 +15 = 46,687

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

  18. Binary  Decimal Example What is 10011100 in decimal? 128 + 0 + 0 + 16 + 8 + 4 + 0 + 0 = 156

  19. Decimal to Binary • A little more work than binary to decimal • Some examples • 3 = 2 + 1 = 11 (that’s 1•21 + 1•20) • 5 = 4 + 1 = 101 (that’s 1•22 + 0•21 + 1•20)

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

  21. Decimal  Binary Example • Convert 28 decimal to binary 32 is too large, so use 16 Binary  10000 Decimal  28 – 16 = 12 Next is 8 Binary  11000 Decimal  12 – 8 = 4 Next is 4 Binary  11100 Decimal  4 – 4 = 0

  22. Decimal  Binary (Fraction) • Convert decimal 0.6875 to binary Integer Fraction Coefficient 0.6875 X 2= 1 0.3750 a-1=1 0.3750 X 2= 0 0.7500 a-2=0 0.7500 X 2= 1 0.5000 a-3=1 0.5000 X 2= 1 0.0000 a-4=1 (0.6875)10 = (0.1011)2

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

  24. Decimal  Octal • Convert decimal 153 to Octal 512 is too large, so use 64 Octal  200 Decimal  153 – 64X2 = 25 Next is 8 Decimal  25 – 8X3= 1 Octal  230 Decimal  1 – 1X1 = 0 Next is 1 Octal  231

  25. Decimal  Octal (Fraction) • Convert decimal 0.513 to Octal Integer Fraction Coefficient 0.513 X 8 = 4 + 0.104 a-1=4 0.104 X 8 = 0 + 0.832 a-2=0 0.832 X 8 = 6 + 0.656 a-3=6 0.656 X 8 = 5 + 0.248 a-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

  26. Binary to Octal • 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

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

  28. 0010 1010 1100 Hex to Binary • Convention – write 0x before number • Hex to Binary – just convert digits 0x2ac 0x2ac = 001010101100 No magic – remember hex digit = 4 bits

  29. 5 3 7 b Binary to Hex • Just convert groups of 4 bits 101001101111011 1011 0101  0011 0111  101001101111011 = 0x537b

  30. Hex to Decimal • Just multiply each hex digit by decimal value, and add the results. 0x2ac 2 • 256 + 10 • 16 + 12 • 1 = 684

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

  32. Decimal to Hex 684 0x2__ 684/256 = 2 684%256 = 172 0x2a_ 172/16 = 10 = a 0x2ac 172%16 = 12 = c

More Related