Lecture 1: Basic Concepts: Assembly Language For x86 Processors
Lecture 1: Basic Concepts: Assembly Language For x86 Processors
• Bit numbering:1 0 1 1 0 0 1 0 1 0 0 1 1 1 0 0
15 0
Every binary
number is a
sum of powers
of 2
37 = 100101
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
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
1 1 1 1 0 1 1 0
Negative
0 0 0 0 1 0 1 0 Positive
00001100 00001100
– 00000011 11111101
01001.
Practice: Subtract 0101 from 0001001
Practice: What is the largest positive value that may be stored in 20 bits?
NOT
AND
OR
Example: X Y
X
mux Z
Y
Two-input multiplexer