Implementing Arithmetic - Week 10 Flashcards

(28 cards)

1
Q

What is a half adder

A

A half adder is a circuit that takes two inputs, A and B, and produces two outputs, S (the sum of A and B) and C out (the carry out)

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

What does a 1‑bit half‑adder compute?

A

It computes the Sum and Carry of adding two single bits A and B.

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

What is the Boolean expression for the Sum output of a half‑adder?

A

Sum = A XOR B.

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

What is the Boolean expression for the Carry output of a half‑adder?

A

Carry = A AND B.

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

What additional input does a full adder have compared to a half adder?

A

A full adder has a carry‑in (Cin) input.

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

What does a full adder compute?

A

It computes the Sum and Carry‑out (Cout) of adding A, B, and Cin.

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

What is the Boolean expression for the Sum output of a full adder (canonical form)?

A

Sum = A’B’C + A’BC’ + ABC + AB’C’.

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

What is the simplified Boolean expression for the Sum output of a full adder using XOR?

A

Sum = A ⊕ B ⊕ C.

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

What is the simplified Boolean expression for the Carry output of a full adder?

A

Carry = A.B + C. (A ⊕ B)

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

Why is the carry output of a full adder 1?

A

Because at least two of the inputs (A, B, Cin) are 1.

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

How do you build an n‑bit adder from full adders?

A

Connect full adders in series so that each adder’s carry‑out becomes the next adder’s carry‑in.

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

What is the main limitation of a ripple‑carry adder?

A

The carry must propagate through all stages, causing delay.

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

What range of integers can be represented using 4‑bit 2’s complement?

A

From −8 to +7.

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

How do you detect overflow in 2’s complement addition (without guard bit)?

A

Occurs when adding two numbers with the same sign produces a result with the opposite sign.

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

If the first number when using 2’s complement is a 1/0 what does it mean

A

1 = negative number
0 = positive number

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

How does the guard bit detect overflow?

A

Overflow occurs when the guard bit of the result differs from the MSB (most significant bit) of the n‑bit result.

17
Q

When does arithmetic overflow happen

A

When the guard bit in the result is different from the most significant bit of the 4-bit representation

18
Q

How is subtraction implemented using an adder?

A

A − B is computed as A + (2’s complement of B).

19
Q

How do you form the 2’s complement of B in hardware?

A

Invert all bits of B (1’s complement) and add 1 via setting the initial carry‑in to 1.

20
Q

How does a single circuit perform both addition and subtraction?

A

Use a mode bit (switch mode/ SM):
SM = 0 → addition
SM = 1 → subtraction (invert B and set Cin = 1)

21
Q

How can multiplication be performed using repeated addition?

A

Multiply A × B by adding A to itself B times.

22
Q

What is binary long multiplication?

A

A method where each bit of the multiplier selects a shifted version of the multiplicand, and the partial products are added.

23
Q

What happens when we multiply by powers of 2

A

Its a case of shifting a bit pattern to the left e.g.

14 x 2 = 1110 x 10 = 11100

14 x 4 = 1110 x 100 = 111000

Multiplying by 2^n = shift left by n positions

24
Q

What are the three main types of shift operations?

A

Logical shifts, arithmetic shifts, and circular (rotate) shifts.

25
What is a logical shift
Bits moved out are lost and zeroes fill the vacated positions e.g. 11100101 shift right, 3 = 00011100
26
What is a circular shift?
Shift where bits shifted out of one end are reintroduced at the opposite end. E.g. 11100101 Left 2 = 10010111
27
What steps occur when computing A − B using an adder‑subtractor?
Invert all bits of B. Set initial carry‑in = 1. Add A + (inverted B) + 1 = A + (2’s complement of B).
28
Why are bitwise logical operations fast?
Because they are typically parallel operations on all bits simultaneously