Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

BCD Arithmetic unit-please help!

Status
Not open for further replies.

elec123

New Member
Hi,

Doing a project at the mo, but just need help on the final section...

I have made a simple circuit consisting of a BCD coded switch, inverting buffers (4049) decoder driver (4511) and 7 seg displayso the number on the switch is displayed.

I then added another switch, another inverter chip, and a 4 bit binary full adder (4008) so the sum of the numbers on the switches is displayed.

This far the circuit is working fine, but it fails for numbers whose sum is greater than 9. I have been given another adder,another display, and a 4058 chip (a dual 2-wide 2-input AND-OR-invert gate).

I know that a BCD carry should be generated and 6 added to the binary sum when the binary sum lies between 1010 and 1111, but can't collect all this to figure out the final circuit diagram, it's the carry in/out business that's confusing me.....

If anyone could reply with the final circuit diagram hints or suggestions it would be much appreciated.

Thanks

Matt
 
The CD4008...

Hola Matt,

Nothing is wrong. Both ICs are doing what they are expected to do.

The CD4008, when adding "A" inputs to "B" inputs will output all possible values from 0 to 15 (decimal), that is 0000 to 1111 (binary).

Now, if you look at the table of valid inputs for the CD4511, whatever input above 9 (decimal), 1001 (in binary) will be decoded as "blank".

And it's correct. Why? Because one decimal digit can be only "0" to "9". Obvious but perhaps not yet evident for you, Matt.

For the whole to work something should convert your binary to BCD (binary coded decimal) so whatever you will input to the CD4511 will be always between 0 and 9 thus happily decoded and shown in the display.

To give you an example= the number 12 (decimal) should be expressed as follows: 0001 0010 (look that here you are representing both decimal digits with TWO binary quantities). Got it?

In other words you should have something in between both stages to offer always a value from 0 to 9 at the 4511's inputs.

I hope I was clear enough. :?:

An additional check you can do, is to verify when A+B exceeds 15 (decimal), 1111 (in binary) there will be a Carry out through the CO pin.

If for any reason you want something synchronized by a clock look for 74LS283 where everything happens when you clock it. Honestly I do not recall if any clocked adder was available in the CD4xxx series.

Buena suerte


Agustín Tomás
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top