Digital Electronics - Serial Two's Complementer Circuit
Design a one input, one output serial 2’s complementer. The circuit accepts a string of bits from the input and generates the 2’s complement at the output. The circuit can be reset synchronously to start and end the operation.Hint: - 2’s complement of a number can be obtained by keeping the least significant bits as such until the first 1, and then complementing all bits
eg: 001010 → 110110
Solution:
State diagram of the design: Let A, B be the two states representing the output states of a D flipflop.
Implementation of the state diagram..
Input(x) | Present State | Next State | D-Input | Output |
---|---|---|---|---|
0 | A = 0 | A = 0 | A = 0 | 0 |
0 | B = 1 | B = 1 | B = 1 | 1 |
1 | A = 0 | B = 1 | B = 1 | 1 |
1 | B = 1 | B = 1 | B = 1 | 0 |
So output Z=input(x) XOR Present State
D-input = input(x) OR Present State
Written by: Shiju
9 Comments (Post a Comment)