350 likes | 563 Views
Digital Computers and Information. Chapter 1 Mano and Kime. Digital Computers and Information. Digital Computers Number Systems Arithmetic Operations Decimal Codes Error Detection and Correction. Block Diagram of Computer. Memory. ROMs and PROMs EPROMs, EEPROMs and Flash Memory
E N D
Digital Computersand Information Chapter 1 Mano and Kime
Digital Computersand Information • Digital Computers • Number Systems • Arithmetic Operations • Decimal Codes • Error Detection and Correction
Memory • ROMs and PROMs • EPROMs, EEPROMs and Flash Memory • Static RAMs and Dynamic RAMs
ROMs and PROMs • ROM • Read-Only Memory • PROM • Programmable Read-Only Memory
EPROMs, EEPROMs and Flash Memory • EPROM • Erasable Programmable Read-Only Memory • Erase with ultraviolet light • EEPROM • Electrically-Erasable Programmable Read-Only Memory • Flash Memory • Electrically-Erasable in bulk
RAMs • RAM • Random-Access Memory • Read-Write Memory • Static RAM • Needs 4 transistors per bit to make a latch • Data lost when power is turned off • Dynamic RAM • One transistor per bit • Data stored as charge on a capacitor • Data must be continually refreshed
W8X Microcontroller Control Unit Datapath
Digital Computerand Information • Digital Computers • Number Systems • Arithmetic Operations • Decimal Codes • Error Detection and Correction
Number Systems N = ...P3P2P1P0. P-1P-2P-3... = ... + P3b3 + P2b2 + P1b1 + P0b0 + P-1b-1 + P-2b-2 + P-3b-3 + ... 375.1710 = 3 x 102 + 7 x 101 + 5 x 100 + 1 x 10-1 + 7 x 10-2 = 300 + 70 + 5 + 0.1 + 0.07 = 375.17
Number Systems N = ...P3P2P1P0. P-1P-2P-3... = ... + P3b3 + P2b2 + P1b1 + P0b0 + P-1b-1 + P-2b-2 + P-3b-3 + ... Binary 1101.112 = 1 x 23 + 1 x 22 + 0 x 21 + 1 x 20 + 1 x 2-1 + 1 x 2-2 = 8 + 4 + 0 + 1 + 1/2 + 1/4 = 13.7510
Number Systems N = ...P3P2P1P0. P-1P-2P-3... = ... + P3b3 + P2b2 + P1b1 + P0b0 + P-1b-1 + P-2b-2 + P-3b-3 + ... Hex 1AB.616 = 1 x 162 + A x 161 + B x 160 + 6 x 16-1 = 1 x 256 + 10 x 16 + 11 x 1 + 6/16 = 256 + 160 + 11 + 0.375 = 427.37510
Number Systems N = ...P3P2P1P0. P-1P-2P-3... = ... + P3b3 + P2b2 + P1b1 + P0b0 + P-1b-1 + P-2b-2 + P-3b-3 + ... Octal 173.258 = 1 x 82 + 7 x 81 + 3 x 80 + 2 x 8-1 + 5 x 8-2 = 1 x 64 + 7 x 8 + 3 x 1 + 2/8 + 5/64 = 64 + 56 + 3 + 0.25 + 0.078125 = 123.32812510
Examples Convert the following binary numbers to decimal: 1101001 10001011.011 10011010
Digital Computerand Information • Digital Computers • Number Systems • Arithmetic Operations • Decimal Codes • Error Detection and Correction
Recall Full Adder Truth Table Ci Ai Bi Si Ci+1 C 0 0 1 0 1 0 1 1 1 1 1 1 0 0 0 0 0 0 0 1 1 0 0 1 0 1 0 0 1 1 0 1 1 0 0 1 0 1 0 1 0 1 1 1 0 0 1 1 1 1 1 1 A B 1 1 0 0 Final carry = 0
Binary Addition Binary 0 0 1 1 0 1 0 1 0 0 0 1 1 0 0 1 1 0 1 1 0 0 0 Dec Hex 35 +19 4E 53 +25 78 0 1 0 0 1 1 1 0
Number System Conversions • Hex, Binary, and Octal to Decimal • Binary Hex • Binary Octal • Hex Octal • Decimal to Hex, Octal, and Binary
Hex to Decimal 8 7 C 9 x 16 128 + 7 135 x 16 2,160 + 12 2,172 x 16 34,752 + 9 34,761
Binary Hex 0110 1010 1000 . 1111 0101 1100 6 A 8 . F 5 C
Binary Octal 011 010 101 000 . 111 101 011 100 3 2 5 0 . 7 5 3 4
Hex OctalGo through Binary 0110 1010 1000 . 1111 0101 1100 6 A 8 . F 5 C 011 010 101 000 . 111 101 011 100 3 2 5 0 . 7 5 3 4
Read up Convert Decimal to any Base Integer Part: Divide by the base, keep track of the remainder, and read up. 16 34,761 16 2,172 rem 9 16 135 rem 12 = C 16 8 rem 7 0 rem 8 34,76110 = 87C916
Read down Convert Decimal to any Base Fractional Part: Multiply by the base, keep track of the integer part, and read down. 0.78125 x 16 = 12.5 int = 12 = C 0.5 x 16 = 8.0 int = 8 0.7812510 = 0.C816
Read down Convert Decimal to any Base Fractional Part: Multiply by the base, keep track of the integer part, and read down. 0.1 x 2 = 0.2 int = 0 0.2 x 2 = 0.4 int = 0 0.4 x 2 = 0.8 int = 0 0.8 x 2 = 1.6 int = 1 0.6 x 2 = 1.2 int = 1 0.2 x 2 = 0.4 int = 0 0.4 x 2 = 0.8 int = 0 0.110 = 0.000112
Examples Convert the following numbers from the given base to the other three bases listed in the table:
Binary Coded Decimal Code decimal numbers using the binary digits, 0 - 9. That is, 0000 - 1001. Can NOT use the hex digits A - F. For example, the DECIMAL number 3582 would be coded in BCD as 0011 0101 1000 0010 While this looks like the HEX number 3582H in BCD we interpret it as the DECIMAL number 3582.
BCD Addition Binary Decimal (BCD) 35H 00110101 +47H01000111 7CH 01111100 35H 00110101 +47H01000111 82H 10000010 0000 B0 35 MOV AL,35H ;AL = 35H 0002 04 47 ADD AL,47H ;AL = AL+47H 0004 27 DAA ;Decimal adjust
Digital Computerand Information • Digital Computers • Number Systems • Arithmetic Operations • Decimal Codes • Error Detection and Correction
Error Detection and Correction • Use of Parity Bit - Extra bit included to make the total number of 1’s either even or odd. Refer to page : 22 for an example. * If a parity error is detected at the receiving end, it can request for a retransmission.
More topics… • Fixed and Floating point numbers – Refer to the ppt presentation on the course website.