ECE 355 Final Exam Questions And Answers (Updated And Verified)
ECE 355 Final Exam Questions And Answers (Updated And Verified) 1. Express the following decimal numbers in 8-bit, two's complement binary: a. -23 b. 102 c. -117 - answera. b. c. 2. Express the following numbers from an 8-bit, two's complement number system in decimal: a. b. c. - answera. 87 b. -44 c. -58 Describe the function of each of the processor status flags - answerCPAZSO! Carry Flag (CF): carry bit for MSB Parity Flag (PF): result has even parity Auxiliary Flag (AF): carry from low to high and borrow to high to low nibbles Zero Flag (ZF): result is zero Sign Flag (SF): code has signed/unsigned values Overflow Flag (OF): result is negative in unsigned code How is the location do the next instruction for the processor to execute determine and how is the physical address computed? - answerLocation: CS:IP Physical Address: ? Ask him 5. Identify the addressing modes for the source and destination operands of the following instructions. a. MOV AX, 0FFH b. MOV [BX] + 0020H, CX c. MOV [BX] [SI] +1020H, DX - answera. MOV AX, 0FFH Destination: AX (Register) Source: OFFH (Immediate Data) b. MOV [BX] + 0020H, CX Destination: [BX] (Register) Source: CX (Indirect with offset) c. MOV [BX] [SI] +1020H, DX Destination: [BX] [SI] (Based indexed Register with offset) Source: DX (Register) Encode the following instructions in machine code: a.) ADD AL, CL b.) SUB DX, [BX][DI]+20H - answer Operation and flag settings: CMP AX, BX Jump if AX BX Which instruction would you use to do this and what flag settings are needed for the jump to occur if: a. the values in the register were considered unsigned. b. If the values in the register were considered signed. - answerUnsigned: Operation: JA Flag settings: (C + Z)' Signed: Operation: JG Flag settings: Z * (C XOR OF)' The following instruction is performed, MUL BX What is the operation, the operands, and where will the result be stored? - answerOperation: unsigned multiplication Operands: AX, BX Result location: DX:AX Write instructions that will set bit 4 of the AH register to 0, set bit 2 to 1, and leave the rest of the bits in the AH register unchanged. - answerAND AH, 0F7h OR AH, 02h What is the difference between the SHL (logical shift left) and the SAL (shift left arithmetic) instructions? - answerThey're the same Describe the four elements of an assembly language statement: Label - answerLocation of memory address in assembly Provides a place in memory for assembler to jump to when executing code Start of Exam 2: Describe the four elements of an assembly language statement: Opcode - answerInstruction (machine/directive) Tells microcomputer what action is to be performed, e.g. ADD, SUB, MOV, etc. Describe the four elements of an assembly language statement: operand - answerData for the operation to use Tells microcomputer the source and destination to perform the operation w/ Describe the four elements of an assembly language statement: Comment - answerAdditional notes about assembly code Documentation, programmer uses this field to explain what a line of code is doing What is the difference between an executable statement and a directive statement in assembly language? - answerExecutable: Adjusts machine code for the processor
Geschreven voor
- Instelling
- ECE 355
- Vak
- ECE 355
Documentinformatie
- Geüpload op
- 28 mei 2024
- Aantal pagina's
- 10
- Geschreven in
- 2023/2024
- Type
- Tentamen (uitwerkingen)
- Bevat
- Vragen en antwoorden
Onderwerpen
-
ece 355 final exam questions and answers updated