Professional Documents
Culture Documents
Computer Organization and Assembly Language: Lecture 1 - Basic Concepts
Computer Organization and Assembly Language: Lecture 1 - Basic Concepts
Virtual Machine
High-level language Assembly language Operating System Instruction Set Arch. Microarchitecture Digital Logic
Level 5 Level 4 Level 3 Level 2 Level 1 Level 0
101.0012 = 1x4 + 0x2 + 1x1 + 0x0.5 + 0x0.25 + 1x0.125 = 5.12510 Example 11010112 = ? 101101112 = ? 10100.11012 = ?
3F9
AB3D16 = ?2 15C.3816 = ?2
11011010112 = 1x512 + 1x256 + 0x128 + 1x64 + 1x32 + 0x16 + 8x1 + 0x4 + 1x2 + 1x1 = 512 + 256 + 64 + 32 + 8 + 2 + 1 = 87510
Signed numbers
0 1 0 0 1 0 1 1
= 7510
sign bit
= -7510
sign bit
overflow bit
Types of Numbers
Storage Type Signed byte Unsigned byte Signed word Unsigned word Signed doubleword Unsigned doubleword Signed quadword Bits 7 8 15 16 31 32 63 Range (low-high) -128 to +127 0 to 255 -32,768 to +32,767 0 to 65,535 -2,147,483,648 to +2,147,483,648 0 to 4,294, 967,295 -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
The OR Operator
X F F T T Y F T F T XY F T T T
Operator Precedence
NOT AND OR Examples: ~x y ~(x y) x (y z)
Higher precedence
x F F T T
~x T T F F
y F T F T
~x y T T F T
x F F T T
y F T F T
~Y T F T F
~x y F F T F
x F F T T
y F T F T
s T F T F
ys F F T F