Computer Organization and Assembly Language: Lecture 1 - Basic Concepts
Computer Organization and Assembly Language: Lecture 1 - Basic Concepts
Language
Lecture 1 Basic Concepts
Virtual Machine
High-level language
Level 5
Assembly language
Level 4
Operating System
Level 3
Level 2
Microarchitecture
Level 1
Digital Logic
Level 0
11010112 = ?
101101112 = ?
10100.11012 = ?
3F9
100112
1000102
17 R 0
8R1
4R0
2R0
1R0
0R1
Signed numbers
0
= 7510
= -7510
sign bit
sign bit
01001011
10110101
1 00000000
overflow bit
28
256
21
29
512
22
210
1024
23
211
2048
24
16
212
4096
25
32
213
8192
26
64
214
16384
27
128
215
32768
Decimal
Hex.
0000
Binary
1000
Decimal
8
Hex.
8
0001
1001
0010
1010
10
0011
10111
11
0100
1100
12
0101
1101
13
0110
1110
14
0111
1111
15
Types of Numbers
Storage Type
Bits
Range (low-high)
Signed byte
-128 to +127
Unsigned byte
0 to 255
Signed word
15
-32,768 to +32,767
Unsigned word
16
0 to 65,535
Signed doubleword
31
-2,147,483,648 to +2,147,483,648
Unsigned doubleword
32
0 to 4,294, 967,295
Signed quadword
63
-9,223,372,036,854,775,808 to
+9,223,372,036,854,775,807
Unsigned quadword
64
0 to 8,446,744,073,709,551,615
~x
X Y
The OR Operator
X
XY
Operator Precedence
NOT
AND
OR
Examples:
~x y
~(x y)
x (y z)
Higher
precedence
NOT, then OR
OR, then NOT
AND, then OR
~x
~x y
~Y
~x y
y
F
F
T
T
F
F
T
T
s y s ~s
F
F
T
T
F
F
F
F
T
T
T
F
F
F
T
T
F
F
F
F
T
T
T
F
x ~s (y s) (x ~s)
F
F
F
F
F
F
F
T
T
T
T
T
F
F
F
T