Consider the following x86 assembly language instructions: MOV AL, 153 NEG AL The contents of the destination register AL (in 8-bit binary), the status of the Carry Flag (CF) and the Sign Flag (SF) after executing these instructions are
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: D. AL = 01100111; CF = 1; SF = 0
Explanation
153 = 10011001. NEG takes the 2's complement: 256 − 153 = 103 = 01100111. CF is set because the operand was non-zero, and SF = 0 because the result's MSB is 0.
Note on the official key: the official key says option A. Official key gives (A), but NEG of 10011001 is 01100111 (103), not 01100110.
More Computer System Architecture questions
- The decimal floating point number -40.1 represented using IEEE-754 32-bit representation and written in hexadecimal form is
- Find the boolean expression for the logic circuit shown below : (1-NAND gate, 2-NOR gate, 3-NOR gate)
- Consider a disk pack with 32 surfaces, 64 tracks and 512 sectors per pack. 256 bytes of data are stored in a bit serial manner in a sector.…
- Consider a system with 2 level cache. Access times of Level 1 cache, Level 2 cache and main 0.5 ns, 5 ns 100 ns memory are and respectively…
- CMOS is a Computer Chip on the motherboard, which is :
- In RS flip-flop, the output of the flip-flop at the time (t+1) is the same as the output at time t, after the occurrence of a clock pulse i…