Perform the arithmetic operations in Part 3 by hand (in HEX or Binary). Also, sp
ID: 2079348 • Letter: P
Question
Perform the arithmetic operations in Part 3 by hand (in HEX or Binary). Also, specify the Z, DC, and C bit for each problem by using the following rules. NOTE: Logic operations only affect the z bit, not DCor C bit. So for those, only specify the Z bit. If any of the operations... No Yes Z-0 Results in an answer of 0? In the case of addition, produces a carry from bit 3 to bit po 1 DC 0 4? remember, LSB is bit 0, not bit 1) In the case of addition, produces a carry from bit 7 (MSB) c 1 c- 0 to imaginary bit 8? In the case of subtraction, produces a borrow from bit 4 DC 0 DC 1 to bit 3? In the case of subtraction, requires a borrow from an C-1 C- 0 imaginary 9th bit to the 8th bit? NOTE: If you use the two's complement method to subtract, focus on the addition rules for Cand DC bit, not subtraction.Explanation / Answer
1). 0x26 - 0x27 = 00100110 - 00100111 =00100110 + (2's complement of 00100111) = 00100110 + 11011001 = 11111111.
As there is no carry from 3 to 4th bit and 7th to 8th bit so both DC=0 and C=0 respectively. As the answer is 0xFF which is not zero Z=0.
Therefore at location 0x21 = 0xFF (11111111) 0x22= 000 (Z,DC,C)
2). 0xC2 + 0xAD = 11000010 + 10101101 = 1 01101111. here the Bold 1 is carry bit.
As there is no carry from 3 to 4 bit DC=0 and there is a carry from 7 to 8th bit C=1. As the answer is not equal to zero Z=0.
Therefore at location 0x23 = 0x6F (1 01101111) 0x24= 001 (Z,DC,C)
3).0xFF AND 0xF0 = 11111111 AND 11110000 = 11110000 =0xF0
As the answer is non zero , Z=0.
Therefore at location 0x25 = 0xF0 (11110000) 0x26= 0 (Z)
4). 0xA3 OR 0xA3 = 10100111 OR 10100111 = 10100111 =0xA3
As the answer is non zero , Z=0.
Therefore at location 0x27 = 0xF0 (10100111) 0x28= 0 (Z)
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.