Preview 1
L04: The ALU & Growth Mindset CSE 390B, Winter 2022 Two’s Complement One binary interpretation to represent negative values Most significant bit (MSB) has a negative weight Add the remaining bits as usual (with positive weights) Example: 0b1101in Two’s Complement –(1 ×23) + (1 ×22) + (0 ×21) + (1 ×20) = –8 + 4 + 0 + 1 = –3 Negation procedure: take bitwise complement and add one
Preview 1
Preview 2
Preview 3
Preview 4
Preview 5
Preview 6