General Compare and Contrast Sht Flashcards
State the main difference between the von Neumann architechture and the Harvard architecture
The main difference is the harvard architecture has seperate memories for instructions and data and hence sereate busses to access these 2 memories, while a von Neuman architecture has a single memeory for storing both programs and data.
Advantage of Von Neumann:
- Only on main memory and can be entirely used by a program
- Having one bus leads to simpler and cost-effective control unit
- Data and instructions are accessed in the same way
Advantage of Harvard
- Two buses can theoretically lead to execution that is twice as fast
- Memories for data and instruction can be of different technologies and siezes
- Safe in the sense that a program cannot overwrite itself
What is the general instruction cycle?
Compare/Contrast CISC vs RISC
CISC - Complex Instruction Set Computer
Large collection of instructions with lots of addressing modes
Primary Goal: use as few lines of assembly languages instructions as possible to complete a task
Advantage: makes translating from high-level languages to assembly easier
Disadvantage: only a very small subset of the instructions will be used in a typical program
RISC - Reduced instruction set computer
small collection of instructions with few adressing modes
Uses only simple instructions that can be in a single clock cycle
Advantage: pipelining can be used to improve performance (because each insrtruction requires one clock cycle)
Disadvantage: It’s more difficult to write code for, due to limited instruction set and addressing modes and assembly language programs tend to be longer than those written for a CISC architecture
What are the following traps?
What is done on each pass of the compiler?
First pass:
Symbol table created, used on the 2nd pass to “fill in” the label references
Second pass:
- Each line scanned again
- Translated assembly lang to machine lang
- find the right opcode for the instruction
- look up symbls in the symbol table as necessary
- determine operand field for the instruction
- Fill memory locs
What are the instructions that affect condition codes?
Add, And, ld, ldi, ldr, lea, not
What is the difference between JMP and the various forms of branching?
JMP can go beyond the -255 to 256 distance from PC (ask compared to BR)
JMP can jump to anywhere in the memory space
Example:
LEA R4, EXIT
JMP R4
What is the difference between combination and sequential circuits?
Combinational:
Circuits whose output dpeends only on the current inputs
Sequential:
circuits whose output depends on the current inputs and it’s current state.
What is a decoder?
A n-bit decoder has n inputs and 2n outputs
Exactly one output is set to 1 for each input pattern
Think of n inputs as encoding an unsigned number j and kth output is 1 if and only if k = j
Useful for selecting or activating one of many components based on a bit pattern.
What would an encoder do with 3 inputs?
The 3 inputs would represent a 3 bit number.
The outputs would be labeled 0 through to 7 (the binary representations)
Create a decoder for this circuit:
What is a multiplexor and what is it used for?
Inputs:
n-bit selector S0,S1,…Sn-1
2n “data” inputs D0,D1,…D2n-1
Output:
one of the 2n inputs determined by the n-bit
If Sn-1Sn-2…S1S0 = k using unsigned encoding, then the output is the input value Dk
Uses:
select oninput from multiples
Select which computed value to pass to the next stage
What is the difference between a decoder and a multiplexer?
A decoder takes two bits and has 2^n out puts
We make an unsigned number with the selector bits and output the number that it represents
A multiplexor takes this concept but adds an additional input into the gate so that when the number is outputted the actual output is the 1/4 outputs
What is the difference between active high and active low?
What is an S-R latch and how does it work?
It is important that we do not set the latch to S=1 and R=1
It will just oscilate!
Provide the truth table for a S-R latch
What is the different between an S-R Latch and a D latch
S-R latch:
Should never set R=1, S=1
D-latch:
Is an S-R latch with additional logic with a new input signal.
WE, outputs can be set/reset only when WE=1 (know as level sensitive)
The S-R inputs are replaced with a single input D