click below
click below
Normal Size Small Size show me how
CIS2030 Micro comp
| Question | Answer |
|---|---|
| When tracing a program, which observation gives the strongest evidence that a particular instruction behaved as intended? | The relevant registers, memory locations, flags, and program counter change as predicted |
| In an Easy68K workflow, what should normally happen after the source program is changed and before the revised program is run? | Reassemble the source |
| The original Motorola 68000 has a 24-bit external address bus. Assuming byte-addressable memory, what is its physical address-space size? | 16 MiB |
| A byte-addressable system can generate 2^24 different addresses. How much memory can it directly address? | 16 MiB |
| What is the main role of the processor's control unit? | Direct and coordinate the steps required to execute instructions |
| Which component performs operations such as addition and logical AND inside the processor? | Arithmetic and logic unit |
| A 68000 word contains how many bits? | 16 |
| A 68000 long word contains how many bytes? | 4 |
| Which set names the eight address registers of the 68000? | A0-A7 |
| Which 68000 address register also serves as the stack pointer? | A7 |
| What is a memory map? | An assignment of address ranges to memory and other addressable resources |
| Why is a memory hierarchy used? | No single storage technology provides the best speed, capacity, and cost |
| What is the main role of an assembler? | Translate assembly-language source into machine-code representation |
| Which sequence best represents the basic instruction cycle? | Fetch, decode, execute |
| Which system bus carries the value being transferred between the processor, memory, and input-output devices? | Data bus |
| A byte-addressable system has a 20-bit address bus. What is its maximum directly addressable memory capacity? | 1,048,576 bytes |
| A MOVE.B instruction writes to data register D0. Which portion of D0 is the destination? | The low-order 8 bits |
| In 68000 assembly language, what do the suffixes .B, .W, and .L specify? | Byte, word, and long-word operand sizes |
| Which sequence correctly moves from a human-readable program toward physical execution? | High-level language, assembly language, machine code, hardware |
| Why do computers use layers of abstraction? | To let each layer hide lower-level detail behind a simpler interface |
| What are A0-A7 What are D0-D7 | Address registers and Data registers |
| Why is decimal 0.1 usually stored only approximately in a finite binary floating-point format? | Its binary fractional expansion repeats indefinitely |
| Which statement correctly distinguishes the integer 7 from the ASCII character '7' in one byte? | The integer uses $07, while the character uses $37 |
| Which binary pattern is equivalent to $B4? | %1011 0100 |
| How many distinct patterns can be represented using 16 bits? | 65,536 |
| What signed decimal value does the 8-bit two's-complement pattern $D6 represent? | -42 |
| Which 16-bit pattern correctly sign-extends the 8-bit two's-complement value $D6? | $FFD6 |
| Which statement correctly compares DC and DS assembler directives? | DC places initialized data, while DS reserves storage for runtime data |
| Which memory access is allowed by the original 68000 alignment rule? | A long word beginning at $2002 |
| Which pair gives two valid ways to determine a label's address from a typical listing file? | The address beside the labeled source line and the symbol table |
| After executing MOVE.W #$1234,D0, where should a student look first to verify the destination value? | The data-register display for D0 |
| A 68000 program declares value DC.W $1234. In big-endian byte order, which bytes are stored from the lower address to the higher address? | $12 followed by $34 |
| What does COUNT EQU 10 do? | Associates the symbol COUNT with the value 10 without reserving memory |
| Which hexadecimal value is equal to decimal 173? | $AD |
| What unsigned decimal value is represented by %1011 0110? | 182 |
| A student changes an instruction in an Easy68K source file. What should the student do before trusting the next execution result? | Assemble the modified source and reload the new program |
| Which information is normally available in an assembler listing file? | Source lines, assigned addresses, and generated machine bytes |
| Which byte sequence represents the two-character ASCII string '42'? | $34 $32 |
| What hexadecimal ASCII code represents the character '7'? | $37 |
| What is a primary limitation of one's-complement signed representation? | It has separate positive-zero and negative-zero patterns |
| Which 8-bit pattern represents -18 in two's complement? | $EE |
| How do we tell a signed (negative) from unsigned (positive) in binary | look at most significant bit (far left) 0 indicates positive 1 indicates negative |
| For the 8-bit addition $FF + $01, which result and flags are correct? | $00, C=1, Z=1, V=0 $FF + $01 = $100, but in 8 bits only $00 fits. The extra 1 goes into the carry flag |
| D0 contains $0000002F, which is decimal 47. What is D0 after DIVU.W #10,D0? | $00070004 47 ÷ 10 = 4 remainder 7. For DIVU.W, the quotient goes in the lower word and the remainder goes in the upper word: $0007 0004 |
| An ADD sets C=1. The next instruction is MOVE.W #0,D0. Which statement is correct after the MOVE? | Z=1, N=0, V=0, C=0, while X is unchanged MOVE.W #0,D0 sets the flags based on the result. MOVE does not change X. |
| Why does byte result $80 set N, while word result $0080 clears N? | The sign position is bit 7 for a byte but bit 15 for a word For $80 as a byte, bit 7 is 1 → N=1. For $0080 as a word, bit 15 is 0 → N=0. |
| On the 68000, which suffix selects a 16-bit operand? | .W .B = 8 bits .W = 16 bits .L = 32 bits |
| D0 initially contains $12345678. What is D0 after MOVE.B #$AB,D0? | $123456AB MOVE.B only changes the lowest byte. $12345678 → $123456AB |
| What is the byte result of ASR.B #2 applied to $D4? | $F5 $D4 in binary is: 11010100 Arithmetic shift right 2 keeps the sign bit (1): 11110101 = $F5 |
| What is the byte result of LSR.B #1 applied to %10110110? | %01011011 Logical shift right fills the left side with zeros: 10110110 → 01011011 |
| D0 contains $1234560F. What is D0 after NOT.B D0? | $123456F0 NOT.B only flips the lowest byte: $0F → $F0 |
| D0's low byte is $A0. What is the low byte after ORI.B #$0C,D0? | $AC OR: A0 = 1010 0000 0C = 0000 1100 1010 1100 = AC |
| What is the byte result of ROR.B #4 applied to $A7? | $7A |
| What is the byte result of LSR.B #1 applied to %10110110? | %01011011 |
| For the 8-bit addition $80 + $80, which pair of flag values is correct? | C=1 and V=1 |
| What is the 8-bit result of $03 - $04, and what does C indicate? | $FF, and C=1 indicates a borrow |
| Why does byte result $80 set N, while word result $0080 clears N? | The sign position is bit 7 for a byte but bit 15 for a word |
| What does the number sign mean in MOVE.W #$0012,D0? | Use the constant value $0012 |
| If D0 contains 20 and D1 contains 7, what does SUB.W D1,D0 place in D0? | 13 |
| D0's low byte is %10110110. What is the low byte after ANDI.B #%00001111,D0? | %00000110 |
| D0's low byte is $5A. What is the low byte after EORI.B #$FF,D0? | $A5 |
| A0 contains $1000. What happens after MOVE.W (A0)+,D0? | The word at $1000 is loaded and A0 becomes $1002 |
| What does the number sign mean in MOVE.W #$9000,D0? | $9000 is immediate data contained in the instruction |
| What is the main difference between LSL and ASL for a left shift on the 68000? | They move bits the same way, but ASL reports signed overflow through V |
| What distinguishes ROXL from ROL? | ROXL includes the X flag as an additional rotation position |
| A0 contains $1000 and D1.W contains $0003. What effective address is used by MOVE.B 1(A0,D1.W),D0? | $1004 |
| Which statement about absolute short addressing is correct? | It uses one 16-bit address extension word that is sign-extended |
| D0.W initially contains $0003. What is D0.W after SUB.B #4,D0? | $00FF |
| D0 initially contains $123456FF. What is D0 after MOVE.B #3,D0? | $12345603 |
| For 8-bit addition $7F + $01, which interpretation is correct? | The result is $80, C=0, and V=1 |
| When can signed overflow occur during addition? | When operands have the same sign and the result has the opposite sign |
| Why is CLR.L D0 commonly executed before MOVE.W number,D0 and DIVU.W #10,D0? | To remove stale bits from the upper word of the 32-bit dividend |
| Which statement correctly describes DIVU.W #10,D0 on the original 68000? | It divides D0.L by a 16-bit unsigned divisor |
| After SUB.B #4,D0 when D0.B initially equals 3, which flag interpretation is correct? | C=1 because unsigned subtraction requires a borrow; V=0 because signed -1 fits |
| For 8-bit addition $FF + $01, what are the stored result and the C, V, and Z flags? | $00 with C=1, V=0, Z=1 |
| Which instruction keeps only the low byte of D0 and clears the upper 24 bits? | ANDI.L #$000000FF,D0 |
| D0.W contains $0009. What is D0.W after LSR.W #1,D0? | $0004 |
| A0 contains $00001000. What effective address is used by MOVE.B 4(A0),D0? | $00001004 |
| Why can a PC-relative reference remain valid when code and nearby data move together? | The encoded distance between the instruction and target remains unchanged |
| What does (A0) mean in MOVE.W (A0),D0? | Use memory at the address contained in A0 |
| Which addressing mode is used by the source operand in MOVE.W D0,D1? | Data register direct |
| D0.W contains signed a and D1.W contains signed b. After CMP.W D1,D0, which branch skips an if-body whose condition is a < b? | BGE |
| What distinguishes a do-while loop from a while loop? | A do-while body executes at least once because its test follows the body. |
| Initially A0 = $1004. What address is accessed by MOVE.B -(A0),D0, and what is A0 afterward? | Access $1003; A0 = $1003 |
| A word array begins at $4000. What is the address of element 3 when the array uses zero-based indexing? | $4006 |
| A loop body appears immediately before DBRA D2,loop. If D2.W initially contains 3, how many times does the body execute? | 4 |
| Initially D0.W = 0 and D1.W = 0. The following loop executes. What is the final value of D1.W? test CMPI.W #3,D0 BGE exit ADDQ.W #2,D1 ADDQ.W #1,D0 BRA test exit NOP | $0006 |
| After an unsigned comparison, Z = 0 and C = 1. Which branch is taken because the destination is lower than the source? | BLO |
| Which statement correctly describes BRA target? | It transfers control to target regardless of the CCR. |
| D0 = $12340000. What are Z and N after TST.B D0? | Z = 1, N = 0 |
| D0.B = $80. After CMPI.B #1,D0, which pair correctly gives N and V? | N = 1, V = 0 |