Summer exam Devices Flashcards

(165 cards)

1
Q

What is the key difference between analogue and digital values?

A

Analogue values vary continuously, while digital values vary discretely.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Why are digital systems more resistant to noise?

A

Because they operate using discrete values (e.g., binary 0 and 1), making them less sensitive to minor variations.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How is the base of a number typically denoted in this module?

A

By using a subscript after the number, e.g., 1100₂.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the decimal value of the binary number 1100?

A

12

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

List three common alternative number bases used in computing besides decimal.

A

Binary (base 2), Octal (base 8), Hexadecimal (base 16).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How many unique values can be represented with a nibble?

A

16 values (4 bits).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How many unique values can be represented with a Byte?

A

256 values (8 bits).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the general formula for the range of values for an n-bit binary number?

A

0 to (2ⁿ – 1).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How many values can a 3-bit word represent?

A

8 values.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Why are hexadecimal values convenient for representing binary data?

A

Each hex digit corresponds exactly to 4 binary bits, making conversion easier.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is Horner’s method used for in binary conversions?

A

To efficiently convert binary numbers to decimal.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is ASCII?

A

A 7-bit character encoding system representing 128 characters, later extended to 256.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are some limitations of ASCII?

A

It does not support non-Latin alphabets like Greek, Cyrillic, or Chinese.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What encoding system succeeded ASCII to support more characters?

A

Unicode.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are common Unicode encoding formats?

A

UTF-8, UTF-16, and UTF-32.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is binary addition similar to?

A

Decimal addition, but with only two digits (0 and 1).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

How do you compute X - Y using binary arithmetic?

A

By negating Y (using 2’s complement) and adding it to X: X + (-Y).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is fixed-width arithmetic in digital systems?

A

Arithmetic where all numbers are represented using exactly m bits.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What is the problem with fixed-width arithmetic?

A

Overflow can occur if the result exceeds the m-bit range.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

How is the sign represented in sign-and-magnitude format?

A

Using the first bit: 0 for positive and 1 for negative.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What is the main issue with sign-and-magnitude representation?

A

It results in two representations for zero and requires case-specific addition logic.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What real-world analogy is used to explain modulo arithmetic?

A

A 16-hour clock where subtracting 2 hours is like adding 14 (i.e., 16 - 2).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

How is a negative number represented in 2’s complement?

A

As 2ⁿ - X, where X is the number to be negated.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

What is the 2’s complement of 42 in 8-bit binary?

A

11010110, which is 256 - 42 = 214.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What does the most significant bit indicate in 2’s complement?
The sign of the number (0 = positive, 1 = negative).
26
How do you convert a number to its 2’s complement?
Flip every bit and add 1.
27
What is the value range of 8-bit 2’s complement?
-128 to 127.
28
What is the key advantage of 2’s complement over sign-magnitude?
Only one zero and a unified addition logic for both positive and negative numbers.
29
How is subtraction performed using 2’s complement?
Convert the subtrahend using 2’s complement and add it to the minuend.
30
How is overflow detected in 2’s complement arithmetic?
By comparing the carry-in and carry-out of the most significant bit; if they differ, overflow occurred.
31
What is the key limitation of fixed-point arithmetic?
It limits both the absolute range and the precision of values.
32
What is the binary representation of the decimal number 0.2?
It is a recurring binary: 0.001100110011...
33
What components make up a number in scientific notation?
Mantissa, base, and exponent.
34
How is floating-point written in binary form?
As m * 2^e, where m is the mantissa and e is the exponent.
35
What are the three decisions to make in a binary floating-point format?
Total number of bits, number of bits for mantissa, and number of bits for exponent.
36
What is the tradeoff between range and precision?
More bits for the exponent increase range, more for the mantissa increase precision.
37
What is normalisation in binary floating point?
Ensuring only one digit (1) is to the left of the binary point to save space and increase consistency.
38
What is exponent bias and why is it used?
Exponent bias allows storing both negative and positive exponents by adjusting the raw exponent with a fixed bias.
39
What is the exponent bias formula for n-bit exponents?
Bias = 2^(n-1) - 1.
40
What are subnormal numbers?
They are numbers with an exponent of all zeros, representing values very close to zero with reduced precision.
41
What does setting all exponent bits to 1 mean in IEEE 754?
It represents ±∞ if the mantissa is 0, or NaN if the mantissa is non-zero.
42
How do you add two floating-point numbers?
Align exponents by shifting the mantissa of the smaller exponent, add mantissas, normalize, and round.
43
Why does floating-point addition potentially lose precision?
Because aligning exponents may cause small values to be shifted out and lost.
44
What happens in exponent overflow in IEEE 754?
The result is set to NaN or ±∞ depending on the mantissa.
45
Why is floating point preferred over fixed-point in general-purpose computing?
Because it supports a vastly larger dynamic range and better handles very large or small numbers.
46
What is combinatorial logic?
Logic where the output depends only on current input values.
47
What distinguishes sequential logic from combinatorial logic?
Sequential logic depends on current inputs, current outputs, and previous states.
48
What are the three fundamental logic gates?
AND, OR, and NOT.
49
What logic symbol is commonly used to represent NOT in electronics?
R’ (prime) is commonly used.
50
What is the Boolean expression for an AND gate?
A ⋅ B or simply AB.
51
What is the truth table condition for XOR (exclusive OR)?
True if either input is true, but not both.
52
What is a minterm in Boolean algebra?
A combination of inputs that yields a true output.
53
What does the 'sum of products' form represent?
A Boolean expression formed by OR-ing minterms (each an AND of literals).
54
What are universal gates and why are they important?
NAND and NOR gates; they can be used to construct any other logic gate.
55
What Boolean identity is equivalent to (B + A)’?
B’ ⋅ A’, which is the NOR operation.
56
What Boolean identity is equivalent to (BA)’?
B’ + A’, which is the NAND operation.
57
How many input combinations exist for a 3-input truth table?
2^3 = 8 combinations.
58
How do you construct a device to output true when at least two inputs are true?
By creating a truth table, identifying minterms, and simplifying the sum of products.
59
What does the expression Z = CB + CA + BA represent?
A simplified Boolean expression for at-least-two-inputs-true logic.
60
Which gates are required to implement Z = CB + CA + BA using basic gates?
3 AND gates, 1 OR gate, and possibly NOT gates for input inversion.
61
What is the purpose of Boolean minimisation?
To simplify logic expressions, reducing circuit complexity and cost.
62
What is the absorption law in Boolean algebra?
A + AB = A and A(A + B) = A.
63
What does the phrase 'Break the line; change the sign!' refer to?
A simplification heuristic for De Morgan's Theorems.
64
What are Karnaugh Maps (K-maps)?
A visual method for simplifying Boolean expressions by grouping adjacent minterms.
65
Who refined the Karnaugh map technique and when?
Maurice Karnaugh in 1953.
66
Why is grey-code order used in K-map rows and columns?
Because each adjacent cell should differ by only one bit for correct simplification.
67
How many input variables are ideal for Karnaugh maps?
2 to 4 inputs are ideal; use Quine-McCluskey for more.
68
What is a prime implicant in K-maps?
A minimal term that can't be combined further, representing a group of minterms.
69
What is the Quine-McCluskey method used for?
Systematically minimizing Boolean expressions for functions with many variables.
70
What is a minterm?
A product (AND) of all input variables in either true or complemented form, that evaluates to 1 for one input combination.
71
What does combining adjacent 1s in K-maps achieve?
Reduces the Boolean expression by eliminating variables.
72
Why are K-maps less effective for 6+ inputs?
The complexity of visualization and grouping increases exponentially.
73
How do you interpret a cell group of size 2^n in K-maps?
Each group eliminates n variables from the expression.
74
What is the result of combining minterms with the same variables except one?
A simplified term with the differing variable eliminated.
75
What is the result of the Boolean expression C’B’ + CB + (B’A’ | CA’) + (DBA | DC’A)?
It is the final minimized form of a logic expression from a 3-input K-map example.
76
Why is tri-state logic useful in multi-device communication?
It allows devices to not assert any logical value, preventing signal conflicts on shared channels.
77
What are the two main problems if multiple devices assert different logical values on a shared line?
A logical conflict (uncertain signal) and a practical issue (short circuit between voltage and ground).
78
What is a tri-state buffer?
A buffer with an enable input that can output high impedance (Z) when disabled, effectively disconnecting it from the bus.
79
How is high impedance represented and what does it mean?
It is represented as 'Z', meaning the output is not connected to any voltage level.
80
What does the 'don’t care' state mean in K-maps?
It means a condition where the output can be either 0 or 1, typically represented with an X.
81
What is a multiplexer?
A device that selects one of several inputs to pass to the output using selection lines.
82
How many selection lines are required for a multiplexer with n inputs?
log₂(n) selection lines.
83
What is a demultiplexer?
A device that sends an input signal to one of many outputs based on selection lines.
84
What is the difference between multiplexer and demultiplexer?
A multiplexer routes one of many inputs to one output, while a demultiplexer routes one input to one of many outputs.
85
What logic gates are used in a half-adder?
XOR for the sum and AND for the carry.
86
What is a full-adder?
A circuit that adds two bits and a carry-in bit, producing a sum and a carry-out.
87
How do full-adders enable n-bit addition?
By chaining them so that the carry-out of one feeds the carry-in of the next.
88
Why might 'don’t care' input states be useful in circuit design?
They allow simplification because the outcome doesn’t depend on those inputs.
89
Why is a buffer used in digital devices?
To strengthen or isolate signals, especially when multiple devices are connected to a shared channel.
90
How can you control which device talks on a shared communication bus?
Using tri-state buffers or multiplexers with enable signals.
91
What is the key difference between combinatorial and sequential logic?
Sequential logic depends on current and past inputs, while combinatorial logic depends only on current inputs.
92
What is a propagation delay?
The time it takes for a signal to travel through a circuit, potentially causing glitches or timing errors.
93
How is circuit depth defined?
As the maximum number of logic gates a signal passes through from input to output.
94
What is a timing diagram used for?
To visually represent signal changes and propagation delays in digital circuits.
95
What is the function of an SR Latch?
To store one bit of data, allowing it to be set or reset and retained until changed.
96
What is an illegal state in an SR latch?
When both Set and Reset are active simultaneously, causing undefined behaviour.
97
What logic gates are used to construct an active-high SR latch?
Two NOR gates.
98
What does a gated SR latch add to a standard SR latch?
An enable input that controls when the latch is transparent to changes.
99
What is a D latch and how does it avoid illegal inputs?
A D latch combines the Set and Reset into a single Data (D) input, avoiding simultaneous 1s on S and R.
100
What is a clock in sequential logic?
A timing signal used to coordinate state changes in sequential circuits.
101
What happens in a pulse-triggered D-type latch?
The output changes only during the rising edge of the clock signal.
102
What is the difference between a latch and a flip-flop?
A latch is level-triggered while a flip-flop is edge-triggered.
103
What makes the J-K latch different from an SR latch?
The J-K latch toggles output when both inputs are high, avoiding illegal states.
104
What does a D-type flip-flop consist of?
A primary and a secondary latch, each triggered by opposite clock phases.
105
What engineering problem arises when balancing circuit size and depth?
Optimising for one often increases the other; it's a trade-off between complexity and performance.
106
What is the difference between level-triggered and edge-triggered devices?
Level-triggered devices respond to the duration of a control signal, while edge-triggered devices respond to the transition (rising/falling edge) of a clock signal.
107
Why are edge-triggered devices preferred over level-triggered for memory?
They avoid unintended changes during long clock pulses by only allowing updates on a clock edge.
108
What is a pipeline in sequential logic?
A chain of devices where each step advances based on a clock signal, allowing parallel processing of tasks.
109
What determines the maximum speed of a synchronous pipeline?
The speed of the slowest component in the pipeline.
110
What is the main tradeoff between synchronous and asynchronous pipelines?
Synchronous pipelines are easier to design and predict but limited by slowest device; asynchronous ones are potentially faster but complex to implement.
111
What type of machine has outputs dependent only on current state?
A Moore machine.
112
How many flip-flops are needed to store a 3-state machine?
At least 2 flip-flops are needed to encode 3 states (00, 01, 10).
113
Why might JK flip-flops lead to simpler logic expressions?
Because of their flexible input configurations and use of 'don’t care' conditions.
114
What is a ripple counter?
A sequential circuit where each flip-flop’s output triggers the next; used for counting or address sequencing.
115
What does left-shifting a binary number achieve?
It multiplies the number by 2.
116
What is the purpose of a shift register?
To convert data between serial and parallel formats or to perform binary multiplication/division.
117
What is grey code counting and when is it used?
A counting method where only one bit changes between values; useful in minimizing errors during transitions.
118
What are the basic design steps to create a state machine?
Draw a state diagram, create a transition table, compute next state logic, derive output logic, and implement with flip-flops.
119
What is the role of combinational logic in sequential circuits?
To compute the next state and outputs based on current inputs and current state.
120
Why might you use a JK flip-flop instead of a D flip-flop in design?
JK flip-flops offer more flexibility and often require simpler logic for toggling behavior.
121
What are the fundamental components of a CPU?
Arithmetic Logic Unit (ALU), Control Unit, and Registers.
122
What is the Fetch-Execute cycle?
The process where the CPU fetches an instruction, fetches data, executes the operation, and writes back the result.
123
What was Babbage’s Analytical Engine designed to be?
A general-purpose, programmable computer that was Turing complete.
124
Who created the first programming language and for which machine?
Ada Lovelace for Babbage's Analytical Engine.
125
What is the Von Neumann architecture?
A computer design where program instructions and data are stored in the same memory space.
126
What is the Von Neumann bottleneck?
The limitation of having a single data path for both instructions and data, causing performance issues.
127
What early device first showed the idea of computing differences for ballistics?
Babbage’s Difference Engine (1823).
128
What was the significance of the Colossus computer?
It was the first programmable electronic computer, used in WWII.
129
What machine is considered the first actual computer?
ENIAC (1945).
130
What advantage did Registers bring to the CPU design?
They allowed fast, temporary storage of intermediate results, mitigating the Von Neumann bottleneck.
131
What role did Alan Turing play in computing history?
He theorized the Turing Machine and helped design the Bombe for codebreaking.
132
What historical machine was programmable and designed in 1837?
The Analytical Engine by Charles Babbage.
133
What is the purpose of the Control Unit in a CPU?
It directs the flow of data between the CPU and other components.
134
What is the function of the Arithmetic Logic Unit (ALU)?
It performs arithmetic and logic operations on data.
135
Why is the Fetch-Execute cycle important?
It is the basis for how instructions are processed in a computer.
136
What are the basic components required to give instructions to a computer?
You need to specify the operation, the data to apply it to, and where to put the result.
137
What is the purpose of a compiler in program execution?
To convert high-level source code into machine code.
138
What is assembly language?
A human-readable version of binary machine instructions specific to each CPU.
139
What is a zero-address instruction format?
A format where no operands are specified, usually using an accumulator or stack.
140
What CPU is used as an example in the lecture?
The Motorola 68k.
141
How many data and address registers does the Motorola 68k have?
Eight data registers (d0-d7) and eight address registers (a0-a7).
142
What are the suffixes used for data size in 68k assembly?
.B for 8-bit, .W for 16-bit, .L for 32-bit.
143
What is immediate addressing?
It uses literal values as operands (e.g., MOVE #4, D2).
144
What is indirect addressing?
It accesses data using a memory address stored in a register (e.g., MOVE (A0), D3).
145
What is indirect addressing with offset?
It adds an offset to a base register to locate data (e.g., MOVE D0,2(A2)).
146
How many addressing modes does the 68k support?
14 different addressing combinations.
147
What is the function of the Program Counter (PC)?
It holds the address of the next instruction to be executed.
148
What happens to the PC after each instruction?
It is incremented to point to the next instruction (typically by +4).
149
What is conditional branching in assembly?
Branching that occurs only if a specified condition is met, using instructions like BGT or BLT.
150
What is the role of the status register in branching?
It holds flags (e.g., Zero, Negative) that are checked by branch instructions after comparisons.
151
What are the five main stages in the execution of an instruction in a CISC CPU?
Instruction fetch, Instruction decode, Operand fetch, Execute, Operand store.
152
Why must instruction decode occur before the next fetch in CISC architectures?
Because instructions are of variable length, and decoding tells the CPU how much to increment the PC.
153
What problem arises when two instructions in a pipeline access the same data?
A data dependency, which may result in stale data if instruction order isn’t handled carefully.
154
What is a pipeline bubble?
A delay introduced in the pipeline when an instruction must wait due to data dependencies.
155
What happens during the operand fetch stage?
The values required for the operation are retrieved from registers or memory.
156
What makes pipelining more efficient?
It allows different stages of multiple instructions to execute in parallel.
157
Why are branch instructions problematic for pipelining?
Because they change the program counter, making it unclear what instruction to fetch next.
158
How does a pipeline handle conditional branches?
It speculatively fetches and decodes the next instruction but may have to discard it if the branch isn’t taken.
159
What are the main characteristics of RISC architecture?
Simple, fixed-length instructions optimized for fast execution and pipelining.
160
What does CISC stand for and how is it different from RISC?
CISC stands for Complex Instruction Set Computer; it uses more complex, variable-length instructions.
161
Where are RISC architectures typically used?
In mobile phones and small embedded systems where power and simplicity are important.
162
What is a magic number in programming, like 0xDEADBEEF?
A unique constant often used for debugging or marking memory regions.
163
What advantage does fixed-length instruction format provide in RISC CPUs?
It simplifies the fetch and decode stages and allows for faster pipelining.
164
Why is decoding binary instructions by hand considered useful in this lecture?
To understand how machine code maps to assembly and what the CPU is doing internally.
165
What is meant by 'instructions are just data' in the context of Von Neumann architecture?
Both instructions and data are stored and processed from the same memory using the same format.