4.3 Introduction to Assembly Programming4 Class 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-10 Sections 4.1 -- 4.5
  2. Flags. Read IA-32 Volume 1 [3] Pages 3-21 -- 3-22. Section 3.4.3.1 about bits CF, ZF, SF, and OF.
  3. Binary Arithmetic Instructions. Read IA-32 Volume 1 [3] Pages 7-12 -- 7-13. Sections 7.3.2 -- 7.3.3
  4. Logical Instructions. Read IA-32 Volume 1 [3] Pages 7-15. Sections 7.3.5
  5. Floating-point. Read IA-32 Volume 1 [3] Pages 4-15 through 4-21 Sections 4.8 -- 4.8.3.2
  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 math: Fill in table

Expression Signed Unsigned Hex 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

Turn in the five (5) tables with your name written on them. This is the math lab.


Instructor: Louis Taber, louis.taber.at.pima at gmail dot com (520) 206-6850
My web site in California
The Pima Community College web site

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