4.3 Introduction to Assembly Programming4 Schedule4.1 Getting started4.2 Numbers and Bits

4.2 Numbers and Bits

4.2.1 Reading and Web Sites

  1. Data Types. Read IA-32 Volume 1 [3] Pages 4-1 through 4-8 Sections 4.1 -- 4.5
  2. Flags. Read IA-32 Volume 1 [3] Pages 3-13 -- 3-14. Section 3.4.3.1 about bits CF, ZF, SF, and OF.
  3. Binary Arithmetic Instructions. Read IA-32 Volume 1 [3] Pages 7-9 -- 7-10. Sections 7.2.2 -- 7.2.2.4
  4. Logical Instructions. Read IA-32 Volume 1 [3] Pages 7-12 -- 7-16. Sections 7.2.4 -- 7.2.5.3
  5. Floating-point. Read IA-32 Volume 1 [3] Pages 4-11 through 4-14 Sections 4.8 -- 4.8.2.1
  6. Browse at IA-32 Volume 1 [3] After page 5-4.

4.2.2 Notes

4.2.3 Lab Assignment

Number conversion: Fill in table

Binary Decimal Hexadecimal
133
158
1011011
1100100
0x00
0x12
0x34
0x77
0xA7
0x80
.125
10110.011012

Arithmetic: Fill in table

Expression Binary Decimal Hexadecimal
0xABCD + 0x94DB XXXXX
0xABCD - 0x94DB XXXXX
0xABCD * 2 XXXXX
0x94DB / 2 XXXXX
133 + 158
0xA7 + 0x12
0x77 + 0x77
0x77 / 2
0x77 * 2

8 bit twos complement - conversion: Fill in table

Binary Decimal Hexadecimal
57
-57
128
0x00
0x12
0x34
0x77
0xA7
0x80

8 bit twos complement -- math: Fill in table

Expression Decimal Hexadecimal OF SF ZF CF
0x00 - 0x77
0x00 - 0xA7
0x34 + 0x12
0x34 - 0x12
0xA7 - 0x77
0x77 + 0x77
0xA7 + 0xA7
-0x77 / 2
-0x77 / 2
0x00 - 0x80
0xFF + 0x01

Logical Function Practice
a b a AND b a OR b a XOR b NOT a 0x03 0x06
0xFF 0x5A
0x00 0x5A
0x00 0xFF

This does not need to be turned in, but it is quite similar to the first exam.


Instructor: Louis Taber, ltaber at uml dot lt dot Tucson dot AZ dot us (520) 206-6850
My new web Home site in Cleveland, OH
The Pima Community College web site

4.3 Introduction to Assembly Programming4 Schedule4.1 Getting started4.2 Numbers and Bits