# COM1031 - Computer Logic

HideShow resource information
• Created by: NiallJVS
• Created on: 22-01-16 14:02
Propagation Delay
The finite time for a gate to respond to a change in the input signal(s).
1 of 51
Combinational Logic
Combine logic gates, output depends solely on the input states.
2 of 51
Sequential Logic
Use feedback from a sequence of circuits, output depends on input states and previous states.
3 of 51
S = (A XOR B), C = (A AND B)
4 of 51
S = ((A XOR B) XOR Ci), Co = (A AND B OR {(A XOR B) AND C})
5 of 51
Latch
The state of the output is changed whenever the appropriate inputs change and the clock is asserted/1.
6 of 51
Flip-Flop
The state of the output is changed whenever the appropriate inputs change and there is a clock edge/0.
7 of 51
Specifies Memory Locations, uni-directional.
8 of 51
Data Bus
Transfers data and instructions between the CPU and memory, bi-directional.
9 of 51
Specifies either a read or write operation.
10 of 51
Big-Endian
High byte stored first, low byte stored after.
11 of 51
Little-Endian
Low byte stored first, high byte stored after.
12 of 51
X - R26+R27; Y - R28+R29; Z - R30+R31
13 of 51
R16-R31
14 of 51
Difference between JMP and RJMP
RJMP adds and offset to, or subtracts from the program counter.
15 of 51
BREQ
Branch if Equal (Zero Flag Set)
16 of 51
BRNE
Branch if not Equal (Zero Flag Clear)
17 of 51
BRCS
Branch if Carry Set
18 of 51
BRCC
Branch if Carry Clear
19 of 51
Stack Pointer
Contains the address of the (usually) top of the stack, so the stack (usually) grows downwards.
20 of 51
PUSH
Push a value onto the stack
21 of 51
POP
Pop a value off the stack
22 of 51
Common Problems of a Stack
1. If you don't set the stack pointer, the default could be 0x0000 [R0], and pushing would overwrite R0. 2. Another PUSH writes to 0xFFFF [wraparound], where there is no SRAM. 3. Forgetting to POP/PUSH will cause RET to jump to incorrect address.
23 of 51
CALL
24 of 51
RET
Pops the saved return address from the stack. Jumps to that address.
25 of 51
Interrupt
An interrupt is when an event requires immediate (or ASAP) action. This event is usually triggered by hardware, or by time.
26 of 51
When an Interrupt Occurs...
1. The return address of the main program is saved onto the stack. 2. The Global Interrupt Enable I-bit is cleared. 3. The address of the appropriate interrupt vector is loaded into the PC. 3. This causes a JMP to the appropriate ISR.
27 of 51
When the ISR is finished...
1. The Global Interrupt Enable I-bit is set. 2. The PC is loaded with the return address of the main program [from the stack]. 3. Execution of the main program resumes.
28 of 51
Interrupt Service Routine
An ISR is the code that is executed when an interrupt occurs. Each interrupt has its own ISR and Interrupt Vector (the address of the ISR).
29 of 51
Priority of Interrupts
Interrupt vectors lowest in memory have priority over those higher in memory.
30 of 51
Examples of Interrupts
1. Timer1 Overflow Interrupt. 2. Timer1 Compare Match Interrupt 3. Input Capture Interrupt
31 of 51
Difference between ROL and LSL
ROL sets the most far bit to the value of the carry flag. LSL sets the most far bit to 0.
32 of 51
Similarity between ROL and LSL
Both multiply by 2.
33 of 51
The Program Counter (PC)
A pointer to where the processor is up to in the execution of instructions. The memory address where the opcode is currently being executed and stored.
34 of 51
The Memory Buffer Register (MBR)
Interfaces the data bus with several internal processor sub-units. When data is written to memory or when a read operation is perfored, the MBR acts as a temporary buffer.
35 of 51
Microcontrollers
Typically contain RAM and ROM. Provide connections that may be used for control applications. May be regarded as a single chip computer that is programmed to perform a specific range of tasks.
36 of 51
Interrupts of this type can be disabled. Such interrupts can be disabled when the processor is performing time critical operations.
37 of 51
Interrupts of this type cannot be disabled. These interrupts can occur at any time.
38 of 51
Bus
A physical link comprising a group of connections which share a common purpose.
39 of 51
40 of 51
Data Bus
To transfer data
41 of 51
Control Bus
For timing
42 of 51
Backplane Bus
One bus linking everything. Cost effective, but not as secure/reliable.
43 of 51
Synchronous Bus
Transmitters and receivers are synchronised by clock. Used in high-speed transmission.
44 of 51
Asynchronous Bus
Transmitters and receivers are not synchronised by clock. Used in low-speed transmission.
45 of 51
Different Types of ROM
PROM (Programmable ROM), EPROM (Erasable Programmable ROM), Flash EPROM (i.e. memory stick).
46 of 51
Different Types of RAM
DRAM (Dynamic RAM), SRAM (Static RAM), Non-Volatile RAM
47 of 51
Cache Memory
A small amount of very fast/expensive memory located on/near to the processor. Spatial Locality - Holds instructions that are close to address of currently executed instruction. Temporal Locality - Recently executed instructions may soon be needed.
48 of 51
Virtual Memory
Memory Management technique implemented using both hardware and software. Maps memory addresses used by a program [virtual addresses], into physical addresses in computer memory.
49 of 51
Compilation
Carried out before program execution.
50 of 51
Interpretation
Runs during program execution.
51 of 51

## Other cards in this set

### Card 2

#### Front

Combine logic gates, output depends solely on the input states.

#### Back

Combinational Logic

### Card 3

#### Front

Use feedback from a sequence of circuits, output depends on input states and previous states.

### Card 4

#### Front

S = (A XOR B), C = (A AND B)

### Card 5

#### Front

S = ((A XOR B) XOR Ci), Co = (A AND B OR {(A XOR B) AND C})