- 2070 Bhadra · 3 marks
FSM for binary serial addition
Short answer
A Mealy machine with states s0 (carry 0, start) and s1 (carry 1). On input (x,y) LSB first, output sum = (x+y+carry) mod 2; next carry = floor((x+y+carry)/2). Example: 0111+0101 = 1100.
Design a Finite State Machine (FSM) that performs binary serial addition. Show only necessary figures and state diagrams.
Binary serial addition adds two binary numbers bit by bit, starting from the least significant bit (LSB). At each step the machine receives one bit of each number (x, y) and outputs one sum bit, and it must remember only the carry. So two states are enough.
Machine (Mealy type, output on the transition)
- States: s₀ = carry 0, s₁ = carry 1. Start state s₀.
- Input: a pair (x, y), x, y ∈ {0, 1}. Output: the sum bit.
- Rule: t = x + y + carry; output = t mod 2; new carry = ⌊t/2⌋.
State table (next state / output)
| State | 00 | 01 | 10 | 11 |
|---|---|---|---|---|
| → s₀ (carry 0) | s₀ / 0 | s₀ / 1 | s₀ / 1 | s₁ / 0 |
| s₁ (carry 1) | s₀ / 1 | s₁ / 0 | s₁ / 0 | s₁ / 1 |
State diagram (edge label: input / output)
00/0, 01/1, 10/1 01/0, 10/0, 11/1
+--+ +--+
v | v |
->( s0 )-------- 11/0 ------------>( s1 )
^ |
+----------- 00/1 -------------+
Example: 0111 (7) + 0101 (5)
Feed pairs from the right (LSB first):
| Step | Input (x,y) | State before | Output | State after |
|---|---|---|---|---|
| 1 | (1,1) | s₀ | 0 | s₁ |
| 2 | (1,0) | s₁ | 0 | s₁ |
| 3 | (1,1) | s₁ | 1 | s₁ |
| 4 | (0,0) | s₁ | 1 | s₀ |
Outputs read from the last to the first: 1100 = 12 = 7 + 5. The machine was checked against ordinary addition for all pairs of 4-bit numbers. To get a final carry, feed an extra (0,0) pair; its output is the carry.
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Differentiate Finite State Machine and Automata · Discrete Structure, chapter 2 · asked 2×
- Define FSM; design FSA with two consecutive a's · Discrete Structure, chapter 2 · asked 4×
- Design NFA for strings ending with aba · Discrete Structure, chapter 2
- Design FSA for strings beginning with baa · Discrete Structure, chapter 2
- 39 to binary/hex and 2's complement addition · Digital Logic, chapter 1
- Create classes from design class diagrams · Object Oriented Analysis and Design, chapter 4 · asked 2×
- Sequence detector 1101 FSM and VHDL · Embedded System, chapter 9
- Ageing, its minimization and silicon addition · Electric Machine Design, chapter 1