60 likes | 218 Views
Chapter 2. Guobao Jiang 11210240049@fudan.edu.cn. Outline. 2.1 Information Storage 2.2 Integer Representations 2.3 Integer Arithmetic 2.4 Floating Point 2.5 Summary. 2.1 Information Storage. Problem 2.1 (P29) A. 0x8F7A93 to binary 3
E N D
Chapter 2 Guobao Jiang 11210240049@fudan.edu.cn
Outline • 2.1 Information Storage • 2.2 Integer Representations • 2.3 Integer Arithmetic • 2.4 Floating Point • 2.5 Summary
2.1 Information Storage • Problem 2.1 (P29) • A. 0x8F7A93 to binary3 8 F 7 A 9 3 1000 1111 0111 1010 1001 0011 • D. Binary 1101011011011111100110 to hexadecimal 0011 0101 1011 0111 1110 0110 3 5 B 7 E 6
Boolean Algebras and Rings • Ring (Integer ring, Modular arithmetic) • <Z, + , x, -,0,1> • Boolean algebra • <{0,1}, |, &, ~, 0, 1> • Note :the operations are different!
Logical Operations and Bit-level Operations P49 • LO: • 1) nonzero argument as TRUE, 0 as FALSE • 2) logical operators do not evaluate their second argument if what?