Documente Academic
Documente Profesional
Documente Cultură
6th Edition
Kip Irvine
(c) Pearson Education, 2010. All rights reserved. You may modify and copy this slide show for your personal use, or for
use in the classroom, as long as this copyright statement, the author's name, and the title are not changed.
The Bottom-Up Approach
We can study computer architectures by starting
with the basic building blocks
Transistors and logic gates
• Level 4
• Application-oriented languages
• C++, Java, Pascal, Visual Basic . . .
• Level 3
• To be learned in 03-60-266
• Level 2
• System bus
• Memory
registers
I/O I/O
Central Processor Unit Memory Storage
Device Device
(CPU) Unit
#1 #2
ALU CU clock
control bus
address bus
1 byte = 8 bits
1 word = 2 bytes
1 double word = 2 words (= 32 bits)
1 quad word = 2 double words
17
Data Representation
18
Number Systems
19
Binary Numbers
Every binary
number is a
sum of powers
of 2
37 = 100101
carry: 1
0 0 0 0 0 1 0 0 (4)
+ 0 0 0 0 0 1 1 1 (7)
0 0 0 0 1 0 1 1 (11)
bit position: 7 6 5 4 3 2 1 0
word 16
Standard sizes:
doubleword 32
quadword 64
• Divide the sum of two digits by the number base (16). The quotient
becomes the carry value, and the remainder is the sum digit.
1 1
36 28 28 6A
42 45 58 4B
78 6D 80 B5
21 / 16 = 1, rem 5
16 + 5 = 21
-1
C6 75
A2 47
24 2E
33
Signed Integers
The highest bit indicates the sign. 1 = negative,
0 = positive
sign bit
1 1 1 1 0 1 1 0
Negative
0 0 0 0 1 0 1 0 Positive
00001100 00001100
– 00000011 11111101
00001001
The highest bit is reserved for the sign. This limits the range:
Practice: What is the largest positive value that may be stored in 20 bits?
39
Maximum and Minimum Values
40
Character Representation
41
The ASCII Character Set
43
Character Storage
• Character sets
• Standard ASCII (0 – 127)
• Extended ASCII (0 – 255)
• ANSI (0 – 255)
• Unicode (0 – 65,535)
• Null-terminated String
• Array of characters followed by a null byte
• Using the ASCII table
• back inside cover of book
• pure binary
• can be calculated directly
• ASCII binary
• string of digits: "01010101"
• ASCII decimal
• string of digits: "65"
• ASCII hexadecimal
• string of digits: "9C"
• NOT
• AND
• OR
• Operator Precedence
• Truth Tables
NOT
AND
OR
Example: X Y
X
mux Z
Y
Two-input multiplexer