Semester 1 Flashcards
What is the ALU?
The arithmetic logic unit is a component of the computer to perform arithmetic or mathematical operations.
Here is an ALU, what are the following parts?
INVA A, ENA, ENB, F0 and F1.
- ENA and ENB (ENABLERS) have to be high voltage for A or B to be considered.
- INVA gives the inverse of A
- F0 and F1 (the decoder) decide the operation to be enabled in the logical unit.
How many numbers can you add up to in bits in an 8bit adder?
2^8 = 64
What are each of the labelled components within clock cycle 1?
What do these field descriptions mean for an example microarchitecture?
B
Mem
C
ALU
J
Addr
- Selects B bus source
- Mem = Memory functions
- C = Selects which registers written from C bus
- ALU = ALU and Shifter Functions
- J = Determines how the next microinstruction is selected
- Addr - Contains address of potential next microinstruction
What does adding « 8 to a microinstruction do?
Shift the result left by 1 byte
What are the logic circuits whose outputs at any instant of time depend not only on the present input but also on the past outputs called?
Sequential circuits
What is the Control Unit responsible for?
- Fetching instructions from memory
- Configuring ALU
- Moving data
512kB
Consider the 1-bit Full Adder and assume all the inputs are applied at time t=10. When is the output ready? Assume all the basic gates have two units of time delay.
t = 22
1 XOR gates, containing 3 basic gate rows 3 x 2 = 6
2 AND gates = 4
1 OR gate = 2
= 12
10 + 12 = 22
What is the purpose of the adder?
An adder is a digital circuit which performs addition to numbers. It is used within the processor and is essential for the ALU.
What is the purpose of a comparator?
Comparators compare two currents and use the largest current as the results.
What is a PLD?
- A programmable logic device (PLD) is an electronic component used to build reconfigurable digital circuits.
- PLD has an undefined function at the time of manufacture.
- Before the PLD can be used in a circuit it must be programmed to implement the desired function.
- Programming a PLD changes the connections made between the gates in the device.
What are 4 Combinational Logic Circuits which perform Arithmetic and Logic Functions?
- Adders
- Subtractors
- Comparators
- PLD’s
What are 4 Combinational Logic Circuits which perform Data Transmission?
- Multiplexers (i.e. majority vote)
- Demultiplexer
- Encoder
- Decoder
What are 3 Combinational Logic Circuits which perform Code Conversion?
- Binary
- BCD
- 7-segment
What method causes branching as an error?
Pipelining
Consider the 8-bit Adder with Look Ahead Carry and assume all the inputs are applied at time t=4. When is the result of addition ready? Assume all the basic gates have one unit of time delay.
12, look ahead carry simply adds 1t per bit, so 8 + 4 = 12
What are programs?
- Programs are what a computer does, using the CPU
What is the purpose of the logic level in computer architecture?
To make decisions and perform basic functionality
What truth table represents the XNOR gate?
What is the processor?
- Sometimes referred to as the CPU (central processing unit) processes data by executing program instructions.
- At processor level, these will be low-level instructions in the form of machine code that the processor has been designed to handle based on a specific processor instruction set
What is main memory?
- Main memory is memory that can be accessed directly by the processor.
- Each memory location (instructions/data stored as binary sequences), has a physical address, used to locate it and its content.
- It is external memory not located in the CPU
What are the two main types of memory?
- RAM (Random Access Memory) : The working memory that is used by the processor during the Fetch-Decode-Execute cycle. It is volatile
- ROM (Read Only Memory) : Memory which is used in the boot process for the computer system. It is non-volatile
What are registers?
- Fast local memory on the CPU
- Very small storage locations used to hold data temporarily
- They have very high read/write speeds
What are I/O Devices? 3 main types.
External (peripheral) devices that can be categorised into 3 groups:
- Secondary storage devices e.g. hard disk
- Input devices e.g. a keyboard/sensor
- Output devices e.g. a speaker/actuator
Each peripheral also has a device driver that provides a software interface for the device
Bus
- A series of parallel wires that connect internal components of a computer system, allowing signals to be passed through them
Bus Width
- The number of parallel wires in a bus has a direct relationship to the number of bits that can be transferred.
Address Bus
Unidirectional
———–>
(away from CPU)
- Transports memory addresses
- Bigger width = larger range of addresses thus - increasing the computers amount of addressable memory
- 1 wire = 2^1 addresses
What is the Data Bus?
Bidirectional
main memory ←———–> processor
- Sends data and instructions
- Bigger width = larger volume of data transfer
- 1 wire = 1 bit
What is the Control Bus?
Bidirectional
Main memory ←———–>CPU(Processor)
- Carries control signals to regulate operations
- Higher clock speed (a control signal) = More instructions per second + higher temp/power consumption
- can control Clock, memory read/write
How is the Von Neumann Architecture structured?
- All data/instructions are stored in the main memory
- Instructions are sent to the processor along the system bus to be executed
- Data sent to/from the processor is sent along the system bus
- Any input/output is performed by i/o devices with the data travelling from them to the cpu/main memory
Harvard Architecture?
- The main difference to the Vonn Neumann Architecture is it has separate buses for data and instructions, making it more efficient and faster
What is integrated graphics?
- It uses other parts of the machine to do its job
What is the Stored Program Concept?
- machine code instructions stored in main memory are fetched and executed serially by a processor that performs arithmetic and logical operations.
Describe the FDE cycle
FETCH
- The content of the PC is copied into the MAR
(PC —> MAR) - The contents of the MAR is transferred to main memory by the address bus
(MAR —Address bus—> MM) - The instructions from MM are sent to the MBR/MDR by data bus simultaneously
(MM —data bus—> MBR) - The program counter is incremented by 1, or points to next instruction
(PC +1) - The content of the MBR is copied to the Current Instruction Register (MBR -> CIR)
DECODE
- The content of the CIR is decoded by the control unit
- The decoded instruction is split into opcode + operand
EXECUTE
- Any data required by the instruction that isn’t present in registers is fetched
- The instruction is carried out
- Results of any calculations are stored in general purpose registers, main memory or an accumulator (e.g. ALU for arithmetic calculators)
What is pipelining?
- Doing multiple parts of the FDE cycle in parallel so that computations can be achieved at a faster rate. (e.g. superscalar architectures to make processes parallel)
- Parallel processing
Complete the 5 level memory hierarchy
using: tape, optical disk, main memory, magnetic/SSD and cache
What is cache?
- Relatively small capacity set of locations that sit close to the processor, used to store instructions and data most frequently used.
- More cache = More instructions can be queued and carried out
L1 Cache is the smallest and fastest
L2 Cache is shared by cores, but larger or slower
L3 and new L4 Slow but large and sit on or near the processor
- L1 is closest to the CPU
- Cache can be cleared to increase the speed
Give the name, algebraic function and truth table of this logic gate
Give the name, algebraic function and truth table of this logic gate
Give the name, algebraic function and truth table of this logic gate
Give the name, algebraic function and truth table of these logic gates
What is a Source?
Source: Where the voltage enters the transistors.
What is a Drain?
Drain: Where the voltage leaves the transistors.
What is a Gate?
The terminal that controls the flow
What is the difference between NMOS and PMOS?
n-MOS: Gate driven positive allows (works) current to flow between Source and Drain. Gate driven negative isolates Source and Drain (stops)
p-MOS: Gate driven negative allows (works) current to flow between Source and Drain. Gate driven positive isolates Source and Drain (stops), PMOS little circle on GATE
Note: Image of a CMOS inverter
+V = 1 = High voltage
-V = 0 = Low voltage
What gate does the CMOS inverter have the same functionality as?
CMOS Inverter has the same functionality as a NOT gate.
Draw/Describe a CMOS NOR Gate
2 p-MOS and 2 n-MOS
Draw a CMOS NAND Gate
Note Reminder: CMOS NAND Gate Silicon Example
How do you calculate the total number of possible input calculations for a gate?
2^N where N is the number of inputs. e.g. 3 inputs would be 2^3 = 8 possible combinations in a truth table
How do you evaluate an XOR gate with more than 2 inputs?
If you have more than 2 inputs, if the number of 1’s is odd, the output is 1, otherwise it is 0.
Make a XOR gate with NAND gates only
You can make XOR gate with just and 4 NAND gates (1, 2 then 1 again)
Boolean Function Circuit Example:
- Using AND gates, we can draw the outputs of M by focusing on the rows of the truth table in which M = 1, drawing 1 AND gate for each 1 output
- Not (line over character) symbolises 0 as the input, NOT 1.
- Truth table consists of only 1’s or 0’s
- Output of 1= 0, 2= 0, 3 = 0 and 4 = 1, and gate 8 is an OR gate, meaning output of M in this case is 1.
Boolean Function Circuit Expressions Example:
How can you construct a NOT gate using a NAND gate?
We can use a NAND gate as a NOT gate if both values put into the NAND gate are the same.
How can you construct a NOT gate using a NOR gate?
We can use a NOR gate as a NOT gate if both values put into the NOR gate are the same.
How can you construct an AND gate using NANDS?
Your second NAND can essentially function as a NOT gate, taking in two of the same value to change the NAND into an AND.
How can you construct AND using NOR?
- First two NOR become NOT via both taking in the same input, NOT + NOR creates an AND Gate as the end result.
- You can do something similar but replace all NOR with NAND to create an OR gate.
Complete the Boolean Identity Table:
Match up the pairs of gates that have circuit equivalence
What is a Multiplexer? What does it always consist of?
Multiple input signals to combine for a singular common output.
Always consists of at least one NOT gate, AND gate and OR gate.
How does the select signal impact a multiplexer?
If the select signal is 0, the output will always be the value of D0
What does a Multiplexer majority do?
- It is an 8 input multiplier that can compute the majority vote function (outputs 1 when most input is 1)
How would you calculate F for each of these outputs?
- Add the value of ABC to decide which D to output, and then outputs the value associated. e.g. if ABC = 7, it chooses D7 and as shown via the diagram 1 is output
What does a decoder do?
- A decoder converts coded inputs into coded outputs where the input and output codes are different
- Large number of outputs, 1 output should be 1, the rest should be 0.
What does an encoder do?
A encoder takes all data inputs one at a time and converts them to a single output
What does a demultiplexer do?
explanation + example given
- input signal D which is connected to all outputs
1. takes the inputs in binary and adds them (ABC)
2. Outputs the number they total
3. e.g., if A = 1, B = 1 and C = 1, this is 111 = 7, so the system would output a 1 where F7 is seen
4. aka 10000000
What is Base 10?
Decimal system, digits 0-9
Each position has a place value/weight, 1 = 10^0, 10 = 10^1, 100 = 10^2
What is notation?
Notation: to denote the base of a number with the base as a subscript (often omitted for base 10)
Why is it beneficial to use binaries during storage
How do you convert binary to decimal?
e.g. 1101
base 2
starting at the value in the lowest place value, multiply each digit by 2^place value
How do you convert octal to decimal?
e.g. 704 (8)
base 8
starting at the value in the lowest place value, multiply each digit by 8^place value
How do you convert hexadecimal to decimal?
base 16
starting at the value in the lowest place value, convert the HEX digits, then multiply each digit by 16^place value