Digital Computers and Information Chapter 1 Mano and

  • Slides: 38
Download presentation
Digital Computers and Information Chapter 1 Mano and Kime

Digital Computers and Information Chapter 1 Mano and Kime

Digital Computers and Information • • • Digital Computers Number Systems Arithmetic Operations Decimal

Digital Computers and Information • • • Digital Computers Number Systems Arithmetic Operations Decimal Codes Alphanumeric Codes

Block Diagram of Computer

Block Diagram of Computer

Memory • ROMs and PROMs • EPROMs, EEPROMs and Flash Memory • Static RAMs

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

ROMs and PROMs • ROM – Read-Only Memory • PROM – Programmable Read-Only Memory

EPROMs, EEPROMs and Flash Memory • EPROM – Erasable Programmable Read-Only Memory – Erase

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

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

W 8 X Microcontroller Control Unit Datapath

W 8 X Microcontroller Control Unit Datapath

The W 8 Z Microprocessor

The W 8 Z Microprocessor

Digital Computer and Information • • • Digital Computers Number Systems Arithmetic Operations Decimal

Digital Computer and Information • • • Digital Computers Number Systems Arithmetic Operations Decimal Codes Alphanumeric Codes

Powers of 2

Powers of 2

Numbers with Different Bases

Numbers with Different Bases

Number Systems N =. . . P 3 P 2 P 1 P 0.

Number Systems N =. . . P 3 P 2 P 1 P 0. P-1 P-2 P-3. . . =. . . + P 3 b 3 + P 2 b 2 + P 1 b 1 + P 0 b 0 + P-1 b-1 + P-2 b-2 + P-3 b-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 =. . . P 3 P 2 P 1 P 0.

Number Systems N =. . . P 3 P 2 P 1 P 0. P-1 P-2 P-3. . . =. . . + P 3 b 3 + P 2 b 2 + P 1 b 1 + P 0 b 0 + P-1 b-1 + P-2 b-2 + P-3 b-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 + 2 + 0 + 1/2 + 1/4 = 11. 7510

Number Systems N =. . . P 3 P 2 P 1 P 0.

Number Systems N =. . . P 3 P 2 P 1 P 0. P-1 P-2 P-3. . . =. . . + P 3 b 3 + P 2 b 2 + P 1 b 1 + P 0 b 0 + P-1 b-1 + P-2 b-2 + P-3 b-3 +. . . Hex 1 AB. 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 =. . . P 3 P 2 P 1 P 0.

Number Systems N =. . . P 3 P 2 P 1 P 0. P-1 P-2 P-3. . . =. . . + P 3 b 3 + P 2 b 2 + P 1 b 1 + P 0 b 0 + P-1 b-1 + P-2 b-2 + P-3 b-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

Problem 1 -4 Convert the following binary numbers to decimal: 1101001 10001011. 011 10011010

Problem 1 -4 Convert the following binary numbers to decimal: 1101001 10001011. 011 10011010

Digital Computer and Information • • • Digital Computers Number Systems Arithmetic Operations Decimal

Digital Computer and Information • • • Digital Computers Number Systems Arithmetic Operations Decimal Codes Alphanumeric Codes

Recall Full Adder Truth Table Ci Ai Bi Si Ci+1 0 0 1 1

Recall Full Adder Truth Table Ci Ai Bi Si Ci+1 0 0 1 1 0 1 0 1 0 1 1 0 0 0 1 1 1 C A B 1 0 0 1 1 1 Final carry = 0 1 0 0 1 1 0

Binary Addition Binary Dec Hex 53 +25 78 35 +19 4 E 0 0

Binary Addition Binary Dec Hex 53 +25 78 35 +19 4 E 0 0 1 1 1 0 0 0 1 1 0 1 0 1 1 0

Recall Full Subtractor Truth Table Ci Ai Bi Di Ci+1 0 0 1 1

Recall Full Subtractor Truth Table Ci Ai Bi Di Ci+1 0 0 1 1 0 1 0 1 0 1 0 0 1 1 0 1 C A B 1 0 0 1 1 Final borrow = 1 0 1 1 0 Hex 5 -7 E

Binary Subtraction Binary Dec 181 - 111 70 Hex B 5 - 6 F

Binary Subtraction Binary Dec 181 - 111 70 Hex B 5 - 6 F 46 1 1 0 0 1 1 0 Final borrow = 0 1 1 0 0 1 0 1 1 1 1 0

Number System Conversions • • • Hex, Binary, and Octal to Decimal Binary Hex

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 x 16 128 + 7 135 x 16 2, 160

Hex to Decimal 8 x 16 128 + 7 135 x 16 2, 160 + 12 2, 172 x 16 34, 752 + 9 34, 761 7 C 9

Binary Hex 0110 1000. 1111 0101 1100 6 A 8 . F 5 C

Binary Hex 0110 1000. 1111 0101 1100 6 A 8 . F 5 C

Binary Octal 011 010 101 000. 111 101 011 100 3 2 5 0

Binary Octal 011 010 101 000. 111 101 011 100 3 2 5 0 . 7 5 3

Hex Octal Go through Binary 0110 1000. 1111 0101 1100 6 A 8 .

Hex Octal Go through Binary 0110 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

Convert Decimal to any Base Integer Part: Divide by the base, keep track of

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 16 135 16 8 0 rem 9 rem 12 = C rem 7 rem 8 34, 76110 = 87 C 916 Read up

Convert Decimal to any Base Fractional Part: Multiply by the base, keep track of

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 0. 5 x 16 = 8. 0 int = 12 = C int = 8 0. 7812510 = 0. C 816 Read down

Convert Decimal to any Base Fractional Part: Multiply by the base, keep track of

Convert Decimal to any Base Fractional Part: Multiply by the base, keep track of the integer part, and read down. 0. 1 0. 2 0. 4 0. 8 0. 6 0. 2 0. 4 x x x x 2 2 2 2 = = = = 0. 2 0. 4 0. 8 1. 6 1. 2 0. 4 0. 8 int int = = = = 0 0 0 1 1 0 0 0. 110 = 0. 000112 Read down

Problem 1 -7 Convert the following numbers from the given base to the other

Problem 1 -7 Convert the following numbers from the given base to the other three bases listed in the table: Decimal Binary Octal Hex 369. 3125 ? ? 10111101. 101 ? ? 326. 5 ? ? F 3 C 7. A

Digital Computer and Information • • • Digital Computers Number Systems Arithmetic Operations Decimal

Digital Computer and Information • • • Digital Computers Number Systems Arithmetic Operations Decimal Codes Alphanumeric Codes

Binary Coded Decimal Code decimal numbers using the binary digits, 0 - 9. That

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 3582 H in BCD we interpret it as the DECIMAL number 3582.

BCD Addition Binary 35 H +47 H 7 CH 0000 0002 0004 Decimal (BCD)

BCD Addition Binary 35 H +47 H 7 CH 0000 0002 0004 Decimal (BCD) 00110101 010001111100 B 0 35 04 47 27 MOV ADD DAA 35 H +47 H 82 H AL, 35 H AL, 47 H 00110101 01000111 10000010 ; AL = 35 H ; AL = AL+47 H ; Decimal adjust

Digital Computer and Information • • • Digital Computers Number Systems Arithmetic Operations Decimal

Digital Computer and Information • • • Digital Computers Number Systems Arithmetic Operations Decimal Codes Alphanumeric Codes

American Standard Code for Information Interchange (ASCII)

American Standard Code for Information Interchange (ASCII)

American Standard Code for Information Interchange (ASCII)

American Standard Code for Information Interchange (ASCII)

First 256 Codes for Unicode (Unicode, Inc. The Unicode Standard: Worldwide Character Encoding, Version

First 256 Codes for Unicode (Unicode, Inc. The Unicode Standard: Worldwide Character Encoding, Version 1. 0 © 1990, 1991 by Unicode, Inc. Reprinted with permission of Addison- Wesley Publishing Company, Inc. )