Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] equivalent circuit using logic gates

Status
Not open for further replies.

jeffrey samuel

Advanced Member level 4
Advanced Member level 4
Joined
Jul 23, 2012
Messages
1,092
Helped
107
Reputation
214
Reaction score
107
Trophy points
1,363
Location
chennai,india
Activity points
6,373
can any one post a circuit for conversion of 4 bit bcd to excess 3 converter using only the basic logic gates
 

I think you need:

bit1 = bit1 OR (bit2 AND (bit3 OR bit4))
bit2 = (bit2) XOR (bit3 OR bit4)
bit3 = NOT(bit3 XOR bit4)
bit4 = NOT(bit4)

where bit1 = MSB, bit4 = LSB

 
Last edited:
  • Like
Reactions: jasonc2

    jasonc2

    Points: 2
    Helpful Answer Positive Rating
can any one post a circuit for conversion of 4 bit bcd to excess 3 converter using only the basic logic gates

Godfreyl's solution is correct and has only 7 gates -- I think it is the best solution. I just want to comment on an alternative approach.

Excess-3 is just the BCD value + 3. Another way to think about it is to start with a 4-bit full adder that adds the constant 3 (0011) to your BCD value. Then you can simplify the logic by removing/replacing gates with constant input or of no consequences to the output. So:



That has 8 gates -- not as simple as the solution in post #2. I'm sure the remains of the second adder can be reduced but I think it is too early in the morning for me to think about it!

I set up an interactive simulation at Falstad (click the inputs on the left to toggle them): https://tinyurl.com/d36tqjh

A good tool for playing with logic circuits is **broken link removed**, it's free and has useful features like subcircuits, etc.

Hopefully I got the drawing right. Better check it though

Your solution is correct but your drawing contains a mistake: the NOT on the bottom is hooked to input bit 3 instead of 4. :)

- - - Updated - - -

That has 8 gates -- not as simple as the solution in post #2. I'm sure the remains of the second adder can be reduced but I think it is too early in the morning for me to think about it!

Oh wait here is another 7-gate solution -- the AND+OR in the second adder above can be replaced with just an OR:

 
Your solution is correct but your drawing contains a mistake: the NOT on the bottom is hooked to input bit 3 instead of 4. :)
Oops, thanks! It's fixed now.

- - - Updated - - -

Oh wait here is another 7-gate solution...
Nice. If you do bit 3 like that, then bit 3 and bit 4 can share a NOT gate for a total of 6 gates.

P.S. I think the bottom XOR in your last diagram should be an OR (or did I get that wrong in my circuit?)

- - - Updated - - -

Like this:


This is fun, I haven't played with sort of thing for years. :grin:
 
to all

digital electronic is always fun but being new and finding many solutions to simple problems is always a boon
 

Nice. If you do bit 3 like that, then bit 3 and bit 4 can share a NOT gate for a total of 6 gates.
...
Like this:

Whoa, good one! That 6-gate solution actually produces different results for 13-15 input (1101, 1110, 1111), but that's outside BCD range. I'll let you know when I figure one out with 5 gates. :lol:

P.S. I think the bottom XOR in your last diagram should be an OR (or did I get that wrong in my circuit?)

Both of our 7-gate circuits give the same output. They're equivalent but I'm not quite sure how without working it out.

This is fun, I haven't played with sort of thing for years. :grin:

I know! There was a class I took in college called "fundamentals of computing systems" (sort of a first-person-to-hack-the-instructors-webserver-gets-an-A kind of class) where every week or so we'd get similar sets of problems (although we were allowed to use addition, subtraction, multiplication, and 32-bit registers), you'd submit the solutions online where they were scored by number of operations and you could see everybody else's scores and resubmit improvements, and the grades were based on the best student's score that week. It was very competitive and tons of fun. I miss that!
 
Last edited:

yea truly speakin this is one area where the taught can be teachers to the teachers :)
 
  • Like
Reactions: jasonc2

    jasonc2

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top