Question for EE/CoE majors

RedArmy

Platinum Member
Mar 1, 2005
2,648
0
0
So basically, we have to design a logic circuit that does some stuff, and I know how to do everything except the very beginning part. The beginning part needs to convert decimal numbers (0-15) to an 8 bit binary number. We can only use 74 series IC's for it so keep that in mind.

I don't really want a straight up answer to the question since I want to be able to know how to do it myself, but I need some guidance into what to look at in terms of converting from decimal to binary. The same goes for how you would multiply numbers in binary. I'm thinking for that that I need to use some version of half/full adders...but I'm not completely sure.

Again, I don't want the answer, just direction into what to look at or a website that would help. Thanks in advance!!
 

PottedMeat

Lifer
Apr 17, 2002
12,363
475
126
By hand?

Don't you just make a table of the inputs and their outputs, plot them on a karnaugh map to minimize the logic, and collect the terms in a particular format ( SOP or POS ) to get a NAND or whatever the other kind of logic was - I can't remember, it's been years.

 

Hyperlite

Diamond Member
May 25, 2004
5,664
2
76
wait, this is in straight logic, not an assembly language? LC-3 or something?
 

RedArmy

Platinum Member
Mar 1, 2005
2,648
0
0
The software that were using is the Altera Quartus II 4.1, we have to make it in a schematic file and then go and receive the outputs from the waveform file after the circuit is complete and compiles successfully.
 

TuxDave

Lifer
Oct 8, 2002
10,571
3
71
I have a lot to say but actually not enough time to write it up.

1) How are you going to represent decimal data to your circuit?
a) An analog voltage where max voltage represents 15 and 0 volts is 0 and everything is evenly distributed in the middle
b) A one hot signal where you have 16 wires labelled 0 to 15 and whatever is powered is the 'decimal' value you are inputting into the circuit
c) Some other method like pushing a button as many times as you want to represent and then flipping a switch saying you're done
d) Or just basic software implementation where you type in your decimal value on the computer and it'll spit out the binary value for you on 8 wires, one wire for each bit.


2) As for doing multiplication, in case anyone is writing up a convoluted method, I would recommend the slower and easier to build shift and add method as opposed to building a booth encoder, wallace tree and completion adder.

I'll revisit this thread after I get dinner.
 

esun

Platinum Member
Nov 12, 2001
2,214
0
0
I don't know if there's some elegant way, but PottedMeat's method sounds spot on. Draw a truth table and fill it in. Write some Karnaugh maps to minimize the number of gates, then implement it. Maybe there's some software that can help you do this (mostly to save you time), I'm not sure.
 

RedArmy

Platinum Member
Mar 1, 2005
2,648
0
0
Were going to manually enter the decimal numbers into the program and test that number through the circuit to see if the correct output is obtained by analyzing the waveform file. The general way I want to go about doing this is basically turn the decimal numbers into an 8 bit binary number, put those into and 8 bit adder, Put the output from that 8 bit adder and the -2 from another adder into a half adder, then take the sum output from that half adder twice and multiply the two numbers. I know Im missing steps but that's my general idea.
 

darthsidious

Senior member
Jul 13, 2005
481
0
71
why do you keep saying 8 bit binary number? 0-15 in decimal should correspond to 4 bits in binary......

 

TuxDave

Lifer
Oct 8, 2002
10,571
3
71
Originally posted by: darthsidious
why do you keep saying 8 bit binary number? 0-15 in decimal should correspond to 4 bits in binary......

It could be 8 bits with the upper 4 bits always zero.
 

TuxDave

Lifer
Oct 8, 2002
10,571
3
71
Originally posted by: RedArmy
Were going to manually enter the decimal numbers into the program and test that number through the circuit to see if the correct output is obtained by analyzing the waveform file. The general way I want to go about doing this is basically turn the decimal numbers into an 8 bit binary number, put those into and 8 bit adder, Put the output from that 8 bit adder and the -2 from another adder into a half adder, then take the sum output from that half adder twice and multiply the two numbers. I know Im missing steps but that's my general idea.


:confused: Now take a deep breath and rephrase what you want to do? An adder has two inputs and one output. I'm seeing a whole lot more outputs than inputs and not really getting what you're trying to accomplish.