Q1: Convert to binary.Answer
Q2: Convert to binary.Answer
Q3: Convert to binary.Answer
Q4: Convert to decimal.Answer
Q5: Convert to decimal.Answer
Q6: Convert to decimal.Answer
Q7: Convert to hexadecimal.Answer
Q8: Convert to hexadecimal.Answer
Q9: Convert to hexadecimal.Answer
Q10: Rewrite in positional notation.Answer
Q11: Rewrite in positional notation.Answer
Q12: Rewrite in positional notation.Answer
Q13: Rewrite in positional notation.Answer
Q14: How many bits do you need to represent values?Answer
Q15: What is the biggest number you can represent with bits?Answer
Q16: What is the smallest addressable unit of information?Answer
Byte
Q17: What is a byte?Answer
8 consecutive bits
Q18: What is a word?Answer
4 consecutive bytes
Notes: Binary Operations (CS2640)
Q19: What happens to a binary number when you shift left bits?Answer
Q20: What is the difference between logical and arithmetic shift?Answer
Q21: Which shift should you use to divide a integer?Answer
Q22: What are the steps to converting an unsigned binary number to two’s complement?Answer
NOT
to every bit.
Q23: Find the 8-bit two’s complement of Answer
Q24: Find the 8-bit two’s complement of Answer
Q25: Convert the two’s complement bit pattern to decimal: Answer
Q26: Convert the two’s complement bit pattern to decimal: Answer
Q27: Perform using binary addition.Answer
Q28: Perform using binary addition and twos complement.Answer
Q29: Which is NOT a main functional unit of the CPU?
Q30: During the execution of a program, what is the primary function of the PC (Program Counter)?
Q31: Which of the following statements best describes the von Neumann architecture?
Q32: What are the three phases of the execution cycle in the CPU? What registers are used in each phase?Answer
Q33: What are three factors affecting performance?Answer
Q34: What is a buffer?Answer
A region of memory that stores information temporarily.
Q35: What do RISC and CISC stand for?Answer
Q36: What are the basic functional units of a computer?Answer
Q37: List the three busses.Answer
Q38: How much memory can a CPU with n address lines hold?Answer
2^n bytes
Q39: How much memory can a 32-bit CPU hold?Answer
4 GB
Notes: MIPS Architecture (CS2640)
Notes: ISA (CS2640)
Notes: MIPS Assembly (CS2640)
Q39: Fill in the memory accesses needed for the following instructions:
Instruction | Operands | Data Count | Instruction Count |
---|---|---|---|
ADD | M3,M2,M1 | ||
ADD | R1,R2,R3 | ||
Instruction | Operands | Data Count | Instruction Count |
---|---|---|---|
ADD | M3,M2,M1 | 3 | 4 |
ADD | R1,R2,R3 | 0 | 1 |
3 | 5 |
Q40: Instruction Set Architecture is __
Q41: Why do we use assembly language?
Q42: What are the parts/fields in a machine instruction?Answer
Q43: What are the different types of MIPS instruction formats? What field do they all share?Answer
They all have an opcode field.
Q44: What is an assembler directive? Tells the assembler where in memory to place thing.Answer
.text
tells assembler that we are giving it instructions (below 0x400000 in MIPS)
Q45: Which is the following is NOT a pseudo-instruction?
li $t1, 0
li $ao, hello
move $to, $t1
addi $t0, $t1, 0
addi $t0, $t1, 0
Q46: translate the following pseudocode to assembly. c
and f
are memory locations.
c=5*(f-32)/9Answer
lw $t0, f
sub $t0, $t0, 32
mul $t0, $t0, 5
div $t0, $t0, 9
sw $t0, c