0% found this document useful (0 votes)
16 views5 pages

Final Exam Guide

Uploaded by

coucou
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views5 pages

Final Exam Guide

Uploaded by

coucou
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Final Exam Guide

Disclaimer: This is a general guideline to help you prepare for the final exam. For a comprehensive
review, you should study the lecture contents that include slide, notes, class works, assignment
and project. The actual exam questions may look different but they will be from the contents
covered in the class. Anything from the course content is a fair question in the exam.

Chapter 1 and 2

● Review this image as it is important to understand how C program compiles and run.

A sample question could be : given the following steps of compiling and running a C program
hello.c (shown below), fill the 3 boxes for input to Assembler and Linker and the output of
Linker.

//hello.c
#include <stdio.h>
int main()
{
printf("Hello, world \n");
}

● Review definitions of bit, byte, hexadecimal.


● Review binary to decimal , decimal to binary conversion.

● Review binary addition

● Review two’s complement, decimal to two’s complement, two’s complement to decimal


conversion.
● How does twos complement help subtract.

● Define overflow

● Signed vs Unsigned numbers

● Logical operations (Bit operations)

● Truth table of And, Or, Not, Xor

● Logical and arithmetic shift left and right

● Draw the diagram of gates.

● Draw a circuit based on Boolean expression.

Chapter 3 Machine Level Representations

● Operand specifiers
o Eg: What does Imm(rb,ri) mean?
o Check the classwork and examples.
o Also review the projects.
● You should remember the basic assembly language instructions, if I think that you need help
with an instruction, you will be provided as hints
● Practice understanding ASM so that you can find what the output of a program may be.

● Practice writing basic ASM programs.


o Review hws
● Writing equivalent C code for an ASM

● Writing equivalent ASM code for C program.

Chapter 4 Processor Architecture

● Review clock
● Review hardware register vs ASM registers

● Finding the encoding for i86_64, check cw and hw


o Eg from hw3, Show the process of encoding of: add 0xabcd(%rdi),%r8 (Att Style)
● Review how hardware register operates for inputs and outputs based on clock

● What are the SEQ stages?


o What happens during Fetch, Decode, Execute, Memory, Writeback and PC?
● What do you mean by sequential and pipelined operations of processors?

● How are ASM operations pipelined?

● What is data dependency?

● What is data hazard?

● What is control hazard?

● What is stalling?

● What is branch prediction?

● Show an example of ASM pipelining by showing the steps of F, D, E, M, WB for the instructions.

● Show an example of stalling.

● Review stalling example from the slide


Chapter 5 Optimization

Review some examples in the slide to optimize the codes. Eg: Given the following code, how to optimize
it?

int x, sum;

sum = 0;

for (int i=0; i < 1000; ++i) {

sum = sum + i;

x = sum - 1;

Chapter 6 Memory hierarchy

● What do you mean by computer memory?

● How does SR Latch, flipflop work? Given the SR Latch gate circuit, how does it retain the
memory? Explain based on the output when Q is 1 and then R and S becomes 0.

R
Q

Q
S '
● How does Gated D latch, flipflop work?

● How does JK flip flop work? Given the characteristic table of JK Flipflop, what will be the output
of the Q(t+1) in the table?

● What do you mean by volatile and non-volatile memory?

● What is the difference between SRAM and DRAM.

● What is SSD?

● Define locality? Why is it necessary for programmers to understand it?

● What do you mean by temporal and spatial locality?

● Given a program review how to check if a variable has temporal or spatial locality?

● Check sumvec examples from slide.

● Why does memory hierarchy exist?

● Define Hit and miss in Cache.

● Check the examples of HIT and MISS in the cache , check cw and examples from slide

You might also like