Computer Hardware Flashcards
How do computers represent data?
With bits (an instance of a state)
What is a bit
A bit represents a state (1 or 0)
What is a nybble (nibble, or nyble)
Four consecutive bits
What is a byte?
Eight consecutive bits
When talking about memory what is the concept of a “word”
Basic unit of data that a cpu can process at one time.
How many possible characters in ASCII and why?
2^7, so 128.
This is because 2 (states 1 or 0) and ASCII characters are stored in 7 bits.
What is a combinatorial logic circuit?
Circuit whose digital output are dependent only on their digital inputs (works in binary, no memory).
All logic gates have two inputs and one output , except for ______.
How does this logic gate behave?
NOT (1 input, 1 output)
Invert (E.g., if input is 1, it will invert it and output 0)
How many functions for 1 input and 1 output?
4
False, Indentity, True, and NOT
How many functions for 2 input and 1 output?
16
Because there are 4 input combinations: (00, 01, 10, 11) . For each combination there are two possible outputs, therefore 2^4 = 16.
What does the AND logic gate look like?
And how does this logic gate work?
2 inputs going into a ‘D’ shape, with one output coming off the other end of the D.
Gives true (1) if both are same.
What does the NAND logic gate look like?
And how does this logic gate work?
Same as AND but with a small circle at the end of the D.
True (1) when they are both NOT true.
What does the OR logic gate look like?
And how does this logic gate work?
2 inputs going into a ‘shield’ shape, with one output coming off the other end of the D.
True (1) when either input or both are true.
What does the EOR/XOR logic gate look like?
And how does this logic gate work?
Similar to or, but an arch is on the top of the shield.
You can have one or the other, but can’t have both.
What a boolean expression for both the ‘OR’ and ‘AND’ logic gates.
Or: Y = A + B
And: Y = A * B
Write a diagram to represent 2 input, 2 output for a circuit containing a ‘XOR’ and a ‘AND’ logic gate.
Combine both with both input bits going to both logic gates.
What is a Ripple Carry Adder?
Each full adder takes the current bits being added, along with any carry from the previous addition stage, and produces the sum and carry output, which is then used in the next stage.
What is a 3-bit Parity Generator
A 3-bit parity generator is designed to ensure that the total number of 1s in the 3-bit binary sequence is always odd, which is typically achieved by setting the parity bit to 1 or 0 to make the total count of 1s odd. This is often used for error checking and correction purposes.
Write an equation so P is always true (3-bit Parity Generator)
P = (notA * notB * notC) + (A * B * notC) + (A * notB * C) + (notA * B * C)
How do 7-segment Digital Displays work?
They form an 7 with lines, and bits symbolise which lines to light up.
What is the Boolean Operator Precedence.
(order in which Boolean operators (such as NOT, AND, and OR) are evaluated)
1st - NOT
2nd - AND
3rd - OR
What is a transistor?
And how do they work?
An electronic switch.
B = Base, C = Collector, E = Emitter
0v to B = Switch opens, C is disconnected from E
Apply v to B = Switch closes, C is connected to E.
What is a demultiplexer?
A multi-way switch where the address selects which output receives the input.
E.g., 00 = Y0, 01 = Y1, 10 = Y2, 11 = Y3
What is a Set-Reset Latch?
Draw a table to represent S R inputs and their corresponding actions.
Used to set and unset latch.
S | R | Action
0 | 0 | None
0 | 1 | Q = 0
1 | 0 | Q = 1
1 | 1 | Invalid
Can you make the Flip-Flop using only NAND gates?
Yes, by inverting S and R.
What is a D-type Flip-Flop
Data Input (D): The value at the D input represents the data that you want to store in the flip-flop.
Clock Input (CLK): The clock input determines when the data at the D input is sampled and transferred to the Q output. The data is transferred on either the rising or falling edge of the clock signal, depending on the specific type of D flip-flop (positive-edge-triggered or negative-edge-triggered).
Q Output: This is the output of the flip-flop, and it reflects the value of the D input when the clock edge occurs.
Q’ Output: This is the complement of the Q output (inverted Q). If Q is high, Q’ is low, and vice versa.
USED FOR:
Data Storage
Synchronization
Sequential Logic
Edge Detection
Frequency Division
Memory Elements
Data Transfer
Control Logic
Serial-to-Parallel Conversion
What is a T-type Flip-Flop
A T-type flip-flop, also known as a toggle flip-flop, is a type of digital circuit used in electronics and digital logic design. It has a single input (T) and a single output (Q). The purpose of a T-type flip-flop is to change its output state based on the input signal.
Here’s how a T-type flip-flop operates:
When the input (T) is set to 0, the flip-flop retains its current state. In other words, the output doesn’t change.
When the input (T) is set to 1, the flip-flop toggles its state. If the output was 0, it changes to 1, and if it was 1, it changes to 0. This is why it’s called a “toggle” flip-flop.
T-type flip-flops are used in various applications, including counters and frequency dividers, where the toggling behavior is valuable for creating clock signals and binary counting sequences.
What is a JK-type Flip-Flop
A JK-type Flip-Flop is a digital circuit element with two inputs, J (set) and K (reset), and a clock input.
If we feed 0 0 to the inputs (Let’s say J and K) it does not change the clock.
If we feed 0 1, it resets it.
If we feed 1 0, it sets it.
If we feed 1 1, it toggles it (Gives not what Q was before)
How can we change the JK-type Flip-Flop into a T and D flip-flop.
T: Set K = J
D: Set K = notJ
How does an Asynchronous Ripple Counter work?
What if we use a 2-bit Ripple Counter?
Switches between 0 and 1 each clock cycle. (Output is half the frequency of the input square wave, or clock cycle)
First will be 0, 1, 0 ,1, 0, 1 …
2-bit will be 00, 11, 00, 11…
And so on.
Show an example of Synchronous Counter bits
1, 0, 1, 0, 1, 0
00, 01, 10, 11, 00
What do Sequential Circuits do?
Store state between each use (i.e., they have memory).
How can you detect inputs with state transition diagrams?
Given the need to find 11011. Write a state transition diagram for this.
What is a Tristate Buffer, and what are it’s three states?
What are the combinations are their corresponding outputs.
High (1), Low(0), High-Impedance(Z).
- Output is either the input (D) or high-impedance.
D | E | Y
0 | 0 | Z
0 | 1 | 0
1 | 0 | Z
1 | 1 | 1
When E is 0 (disabled), the output Y is in a high-impedance state (Z), regardless of the value of D.
When E is 1 (enabled), the output Y is equal to the value of D.
How are buses represented?
With widow arrows (which represents several wires).
What are some ‘buses’ features?
- Used to communicate with parts of the computer.
- Only one transmitter at a time.
- Only one addressed bus can respond (tristate buffer disconnects other devices).
- 2 levels of buses; internal to chip & external to chip.
Memory size is dependent on ____?
address bus ‘width’
2^n bytes for n-lines on the address bus: 2^8 = 256B
So 2^16 = 64KB
2^32 = 4GB
…
How are flip flops grouped?
Into bytes (or larger).
Flip-flops can be grouped into various configurations based on the specific design requirements, which may or may not align with byte-sized or larger data units.