david90
- 311
- 2
A boolean circuit has 4 inputs, a, b, cin and K. when K=0, the circuit is an adder. When K=1, the ciruit is a subtractor. WHere do I start? [?]
The discussion revolves around the design of a boolean circuit that functions as both an adder and a subtractor, controlled by a fourth input, K. Participants explore the boolean equations and schematics necessary for toggling between these two operations, as well as related concepts such as BCD and Gray code.
Participants express varying levels of understanding and readiness to tackle the problem. While some agree on the basic operations of the circuit, there is no consensus on the best approach to derive the boolean equation or the necessity of certain components.
There are unresolved questions regarding the definitions and applications of BCD and Gray code, as well as the implications of using different weighting schemes in binary coding. Additionally, the discussion reflects a mix of familiarity and confusion among participants regarding the concepts involved.
Originally posted by david90
A boolean circuit has 4 inputs, a, b, cin and K. when K=0, the circuit is an adder.
still not helping. ur just restating my question. I already know there are 2 cases and that k=0 then it is an adder.
K is false and the formula gives the output of an adder
or
K is true and the formula gives the output of a subtractor
Originally posted by david90
what is "~"?
Originally posted by chroot
BCD is simply using three binary digits to encode each digit of a decimal number.
Gray code is a kind of code that allows a system to count in binary by making only one bit toggle between numbers. You can think of as just a variation on the normal counting.
I'm assuming that "weighted code" is what you and I would call "normal" (non-Gray) coding, though most people just call that "binary."
For example, a three-bit Gray code is:
000
001
011
010
110
100
101
111
...
...
- Warren
The BCD code 1111 = 2 + 4 + 2 + 1 = 9 decimal.
Not when the non-binary weighting rule "2421" is being used -- which is what david90 was asking about.Originally posted by dlgoff
Wouldn't the BCD code for decimal 9 be 1001?
The main reason for using 2421 over normal 8421 binary is simply that, with 2421, there are no invalid four-bit strings.
You got me. I've never even heard of anyone using this until david90 described it.Originally posted by dlgoff
Thanks. I didn't know about "2421 BCD". Is this what it's called?