4-bit to 7-bit output

Thread Starter

mikez

Joined Jan 21, 2013
47
Hi all,
Have a quick question to make sure I am doing this correctly. I have to take a 4-bit truth table that has 7-bit outcomes and then construct the logic circuit solely made out of ONLY 7 8-to-1 muxes, and 1 inverter.

Here is my truth table for the following logic circuit:

Rich (BB code):
A   B   C   D   V     CA     CB     CC     CD     CE     CF     CG
0   0   0   0   0      1      1      1      1      1     1      0
0   0   0   1   1      0      1      1      0      0     0      0
0   0   1   0   2      1      1      0      1      1     0      1
0   0   1   1   3      1      1      1      1      0     0      1
0   1   0   0   4      0      1      1      0      0     1      1
0   1   0   1   5      1      0      1      1      0     1      1
0   1   1   0   6      1      0      1      1      1     1      1
0   1   1   1   7      1      1      1      0      0     0      0
1   0   0   0   8      1      1      1      1      1     1      1
1   0   0   1   9      1      1      1      1      0     1      1
1   0   1   0   A      1      1      1      0      1     1      1
1   0   1   1   B      0      0      1      1      1     1      1
1   1   0   0   C      1      0      0      1      1     1      0
1   1   0   1   D      0      1      1      1      1     0      1
1   1   1   0   E      1      0      0      1      1     1      1
1   1   1   1   F      1      0      0      0      1     1      1
I used this truth table for a similiar problem and I looked at each of the 7 outputs (these correspond with a 7-segment display) and looked at all of the Maxterms:

CA = Summation M(1,4,B,D)

and so on.

I know there is a way that I can take this truth table and try and minimize it down to a 3 variable and have my output either be a 1, 0, or variation of the 4th input I have gotten rid of (in this case it will be D).

Now I have to use 7 8x1 muxes in this design, so what I have going so far is this:

http://i.imgur.com/JXVZM3y.png

I would have 7 of these - each corresponding to the 7 segments of the display. Now what I am having a difficulty seeing is how I will know what to put in as inputs. Would I continue on the path I am going on right now and look at the outputs from my previous set up? Or am I going in the complete wrong direction? Any advice would be greatly appreciated.
 

thatoneguy

Joined Feb 19, 2009
6,359
Look at the output truth table. There are circumstances where the outputs are the same, but for the one segment, such the middle bar between 8 and 0.

Your current track seems workable. However, I'll add some clutter for other options:

Following that track, with either inputs or outputs, can you minimize the numbers by inverting a bit?

ETA: Another track could be using the output of 2 MUX to control the top half and bottom half of the display (4/3 segment).
 
Last edited:

Thread Starter

mikez

Joined Jan 21, 2013
47
Is the output a /7 or a single bit?
The output per line is a 7-bit output

For the input 0000 = 0 the ouput would be 1111110

So for each of those segments A, B, C, D, E, F a "1" would be sent to it telling it to light up or become active.


Following that track, with either inputs or outputs, can you minimize the numbers by inverting a bit?
Not quite sure what you mean here.
 

thatoneguy

Joined Feb 19, 2009
6,359
Sorry, I'm tired. There are a few ways to reduce requirements, I'm a bit fuzzy right now and not making sense, though (I don't understand my post either). :(
 

Thread Starter

mikez

Joined Jan 21, 2013
47
Sorry, I'm tired. There are a few ways to reduce requirements, I'm a bit fuzzy right now and not making sense, though (I don't understand my post either). :(
I too am tired and I think I may call it a night and stop bashing my head against the wall in trying to figure this out. Maybe a good night sleep will help. Who knows. Thanks again for all your help.
 

ScottWang

Joined Aug 23, 2012
7,409
Using the normal IC to build this true table, it's a hard work and big engineering.

You should place or draw your mux IC on paper or EE symbol drawing tool, and according to the true table connecting the inputs to the mux IC, if need an inverter then add it.

The easy way is to choose an 8 bits EEPROM, and write the data into the memory, the address will be the input data.

Using a mcu as AT89C2051 or some other chips, reading the 4 bits data in and sending the 7 bits data out.
 

takao21203

Joined Apr 28, 2012
3,702
Are we in the ATARI2600 age? Completely made from logic gates, must have been an effin' effort to design.

Microcontroller, problem solved. All 7segment stuff -> Microcontroller.

Anything else is a waste of time and efforts and does not correspond to real world (if it is used for teaching).
 

Thread Starter

mikez

Joined Jan 21, 2013
47
Using the normal IC to build this true table, it's a hard work and big engineering.

You should place or draw your mux IC on paper or EE symbol drawing tool, and according to the true table connecting the inputs to the mux IC, if need an inverter then add it.

The easy way is to choose an 8 bits EEPROM, and write the data into the memory, the address will be the input data.

Using a mcu as AT89C2051 or some other chips, reading the 4 bits data in and sending the 7 bits data out.
Trying to do it usin your suggestion goes around the restrictions I have had placed on what I can use to construct this circuit.
 

tshuck

Joined Oct 18, 2012
3,534
Hi all,
Have a quick question to make sure I am doing this correctly. I have to take a 4-bit truth table that has 7-bit outcomes and then construct the logic circuit solely made out of ONLY 7 8-to-1 muxes, and 1 inverter.

Here is my truth table for the following logic circuit:

Rich (BB code):
A   B   C   D   V     CA     CB     CC     CD     CE     CF     CG
0   0   0   0   0      1      1      1      1      1     1      0
0   0   0   1   1      0      1      1      0      0     0      0
0   0   1   0   2      1      1      0      1      1     0      1
0   0   1   1   3      1      1      1      1      0     0      1
0   1   0   0   4      0      1      1      0      0     1      1
0   1   0   1   5      1      0      1      1      0     1      1
0   1   1   0   6      1      0      1      1      1     1      1
0   1   1   1   7      1      1      1      0      0     0      0
1   0   0   0   8      1      1      1      1      1     1      1
1   0   0   1   9      1      1      1      1      0     1      1
1   0   1   0   A      1      1      1      0      1     1      1
1   0   1   1   B      0      0      1      1      1     1      1
1   1   0   0   C      1      0      0      1      1     1      0
1   1   0   1   D      0      1      1      1      1     0      1
1   1   1   0   E      1      0      0      1      1     1      1
1   1   1   1   F      1      0      0      0      1     1      1
I used this truth table for a similiar problem and I looked at each of the 7 outputs (these correspond with a 7-segment display) and looked at all of the Maxterms:

CA = Summation M(1,4,B,D)

and so on.

I know there is a way that I can take this truth table and try and minimize it down to a 3 variable and have my output either be a 1, 0, or variation of the 4th input I have gotten rid of (in this case it will be D).

Now I have to use 7 8x1 muxes in this design, so what I have going so far is this:

http://i.imgur.com/JXVZM3y.png

I would have 7 of these - each corresponding to the 7 segments of the display. Now what I am having a difficulty seeing is how I will know what to put in as inputs. Would I continue on the path I am going on right now and look at the outputs from my previous set up? Or am I going in the complete wrong direction? Any advice would be greatly appreciated.
(I'm assuming V is just for your reference for the hexadecimal value being displayed, right?)
This follows the same idea we did yesterday in the other thread for making the full adder... a 8-to-1 mux has 3 select lines and 8 inputs. So, you can choose one of the inputs to determine the output for the specific function(segment a, segment c, etc...) and use the inverter to complement where applicable... Do this for each output segment...
 

WBahn

Joined Mar 31, 2012
30,088
Now I have to use 7 8x1 muxes in this design, so what I have going so far is this:

http://i.imgur.com/JXVZM3y.png

I would have 7 of these - each corresponding to the 7 segments of the display. Now what I am having a difficulty seeing is how I will know what to put in as inputs.
This is EXACTLY the same category of problem as the Full Adder using two 4:1 MUXes and an inverter. You needed two MUXes because you had two outputs. You needed the inverter because you had 3 inputs but a 4:1 MUX only has 2 select lines. Here you need seven MUXes because you have seven outputs. You have four inputs but your 8:1 MUXes only have three select lines. So you will use the inverter for exactly the same purpose that you did in the prior circuit.

The point of the exercise is to see if you can take what you learned in implementing the adder and generalize it to a more complex but fundamentally identical problem. Take a look again at how I formatted the truth table in the adder thread and use that same approach here.
 

Thread Starter

mikez

Joined Jan 21, 2013
47
This is EXACTLY the same category of problem as the Full Adder using two 4:1 MUXes and an inverter. You needed two MUXes because you had two outputs. You needed the inverter because you had 3 inputs but a 4:1 MUX only has 2 select lines. Here you need seven MUXes because you have seven outputs. You have four inputs but your 8:1 MUXes only have three select lines. So you will use the inverter for exactly the same purpose that you did in the prior circuit.

The point of the exercise is to see if you can take what you learned in implementing the adder and generalize it to a more complex but fundamentally identical problem. Take a look again at how I formatted the truth table in the adder thread and use that same approach here.
I was able to figure it out. I have been averaging only 3-4 hours of sleep a night for the past week or so and the lack of sleep is not doing me any justice. Thanks everyone for tips, hints, and advice.
 

tshuck

Joined Oct 18, 2012
3,534
I was able to figure it out. I have been averaging only 3-4 hours of sleep a night for the past week or so and the lack of sleep is not doing me any justice. Thanks everyone for tips, hints, and advice.
Glad to hear you are getting the college experience!:p

Breakfast of champions: 1 part coffee to 2 parts Red Bull
 

WBahn

Joined Mar 31, 2012
30,088
I was able to figure it out. I have been averaging only 3-4 hours of sleep a night for the past week or so and the lack of sleep is not doing me any justice. Thanks everyone for tips, hints, and advice.
Wonderful!

My guess is that your struggles with this problem have taught you quite a bit that will be useful down the road.

As for the lack of sleep -- I've noticed that it doesn't seem to improve much out in the "real world". :D

The nice thing about college was that, no matter how far behind you got, at least twice a year you were caught up. That's a feeling I haven't known since!
 

Thread Starter

mikez

Joined Jan 21, 2013
47
Glad to hear you are getting the college experience!:p

Breakfast of champions: 1 part coffee to 2 parts Red Bull
That just sounds like death! I don't drink coffee. Never touched the stuff and have been going strong through engineering school just fine without it - also I don't plan on starting to need it as well.
 

Thread Starter

mikez

Joined Jan 21, 2013
47
Please post your solution, I'm interested in how it worked out.
Hopefully I can explain my suggestion thoroughly without giving the exact solution away (this is a homework problem that can appear for other university students).

I took my truth table that I assembled in my first port and looked at D which was my LSB. I then began to reduce my truth table by looking at what each segment was when D was 0/1. By looking at that I was able to tell if the input was HIGH, LO, D or ~D. Going from a 4 variable truth table down to a 3 meant going from 16 inputs down to 8 - this is where the muxes come into play. Each of the 7 muxes correspond with a segment of the LED display. I then just connected the proper inputs to the corresponding muxes and there you go. There were more parts to the assignment that I left out, but basically there was a button on the microntoller that when we hit it would display the 2s complement of the number entered in via the switches.

Hopefully my explaination was clear and concise.
 

thatoneguy

Joined Feb 19, 2009
6,359
Hopefully I can explain my suggestion thoroughly without giving the exact solution away (this is a homework problem that can appear for other university students).

I took my truth table that I assembled in my first port and looked at D which was my LSB. I then began to reduce my truth table by looking at what each segment was when D was 0/1. By looking at that I was able to tell if the input was HIGH, LO, D or ~D. Going from a 4 variable truth table down to a 3 meant going from 16 inputs down to 8 - this is where the muxes come into play. Each of the 7 muxes correspond with a segment of the LED display. I then just connected the proper inputs to the corresponding muxes and there you go. There were more parts to the assignment that I left out, but basically there was a button on the microntoller that when we hit it would display the 2s complement of the number entered in via the switches.

Hopefully my explaination was clear and concise.
Nice solution!

If you are bored (lol!) try making one using the maximum components, then see what the footprint and timing sim give for variation.
 

Thread Starter

mikez

Joined Jan 21, 2013
47
Nice solution!

If you are bored (lol!) try making one using the maximum components, then see what the footprint and timing sim give for variation.
Thanks! I was kicking myself when I saw the very minute error on the assignment. After prolonged lack of sleep while staring at 0's and 1's they seem to all start blurring together into a long blob.
 
Top