How can a 4-bit two's complement operation be implemented using boolean NOR gate? I search lots of 4-bit two's complement videos and articals, but most of them are using XOR gate.
-
2$\begingroup$ Two's complement is just a standard how to interpret a number of bits as a number. There is no two's complement operation. 1111 is -1 because I look at it and that's what the label "two's complement" tells me what it is. So what operation are you trying to perform? $\endgroup$– gnasher729Dec 12, 2022 at 17:57
-
$\begingroup$ NOR is an universal gate, so it can implement any boolean operation. $\endgroup$– Rinkesh PDec 13, 2022 at 4:05
2 Answers
A NOR can serve as an inverter, so 1's complement is easy. Now you need to implement two-bit adders to increment the result. A sum is a XOR ($a\oplus b=\overline{\overline{(\overline{(a+b)}+\overline{(\overline a+\overline b)})}}$, and the carry out an AND ($a\cdot b=\overline{\overline a+\overline b}$).
Boolean NOR is universal, so you can construct an XOR gate or any other gate from NOR gates, and then use the methods you've read about.