Digital Computers and Information Chapter 1 Mano and Kime
Digital Computers and Information Digital Computers Number Systems Arithmetic Operations Decimal Codes Alphanumeric Codes
Block Diagram of Computer
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
The W8Z Microprocessor
Digital Computer and Information Digital Computers Number Systems Arithmetic Operations Decimal Codes Alphanumeric Codes
Powers of 2
Numbers with Different Bases
Number Systems N =...P 3 P 2 P 1 P 0. P -1 P -2 P =... + 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 x x x x x = =
Number Systems N =...P 3 P 2 P 1 P 0. P -1 P -2 P =... + 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 = 1 x x x x x x 2 -2 = /2 + 1/4 = Binary
Number Systems N =...P 3 P 2 P 1 P 0. P -1 P -2 P =... + 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 AB.6 16 = 1 x A x B x x = 1 x x x 1 + 6/16 = = Hex
Number Systems N =...P 3 P 2 P 1 P 0. P -1 P -2 P =... + 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 = 1 x x x x x 8 -2 = 1 x x x 1 + 2/8 + 5/64 = = Octal
Problem 1-4 Convert the following binary numbers to decimal:
Digital Computer and Information Digital Computers Number Systems Arithmetic Operations Decimal Codes Alphanumeric Codes
Recall Full Adder Truth Table C i A i B i S i C i A B C Final carry = 0
Binary Addition E Dec Hex Binary
Recall Full Subtractor Truth Table C i A i B i D i C i A B C Final borrow = E Hex
Binary Subtraction B5 - 6F 46 Dec Hex Binary Final borrow = 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 87C987C9 x x 16 2, ,172 x 16 34, ,761
Binary Hex A8. F 5 C
Binary Octal
Hex Octal Go through Binary A8. F 5 C
Convert Decimal to any Base Integer Part: Divide by the base, keep track of the remainder, and read up , ,172rem rem 12 = C 16 8 rem 7 0 rem 8 Read up 34, = 87C9 16
Convert Decimal to any Base Fractional Part: Multiply by the base, keep track of the integer part, and read down x 16 = 12.5 int = 12 = C 0.5 x 16 = 8.0 int = 8 Read down = 0.C8 16
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 = x 2 = 0.4 int = x 2 = 0.8 int = x 2 = 1.6 int = x 2 = 1.2 int = x 2 = 0.4 int = x 2 = 0.8 int = 0 Read down =
Problem 1-7 Convert the following numbers from the given base to the other three bases listed in the table: DecimalBinaryOctalHex ??? ? ?? ??326.5? ???F3C7.A
Digital Computer and Information Digital Computers Number Systems Arithmetic Operations Decimal Codes Alphanumeric Codes
Binary Coded Decimal Code decimal numbers using the binary digits, That is, Can NOT use the hex digits A - F. For example, the DECIMAL number 3582 would be coded in BCD as While this looks like the HEX number 3582H in BCD we interpret it as the DECIMAL number 3582.
BCD Addition Binary 35H H CH Decimal (BCD) 35H H H B0 35 MOV AL,35H ;AL = 35H ADD AL,47H ;AL = AL+47H DAA ;Decimal adjust
Digital Computer and Information Digital Computers Number Systems Arithmetic Operations Decimal Codes Alphanumeric Codes
American Standard Code for Information Interchange (ASCII)
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.)