Help with ECE lab...

iamtrout

Diamond Member
Nov 21, 2001
3,001
1
0
Say that you have 75 ( 01001011 ) and you want to display the number on two displays. Each display can only display a single digit, so you have to send a "7" ( 0111 ) to one display and a "5" ( 0101 ) to the other display for the entire number 75 to be displayed.

How do you get the binary for 7 and 5 from 75?
 

Bassyhead

Diamond Member
Nov 19, 2001
4,545
0
0
Originally posted by: smack Down
Use teh first 4 bits for the 7 and the last four bits for the 5

That would work if the number (75) were hexadecimal and the upper nibble was "7" and the lower nibble was "5".

Edit: If you do it the way you suggest, you'll get 4 and 11.
 

Bassyhead

Diamond Member
Nov 19, 2001
4,545
0
0
OP: Divide the 75 by 10 to get the "7". Multiply the "7" by 10, subtract that from the original 75 and you'll be left with the "5".
 

iamtrout

Diamond Member
Nov 21, 2001
3,001
1
0
Originally posted by: Bassyhead
OP: Divide the 75 by 10 to get the "7". Multiply the "7" by 10, subtract that from the original 75 and you'll be left with the "5".

So I would need some form of ALU in my circuit?
 

slpaulson

Diamond Member
Jun 5, 2000
4,414
14
81
Is it going to be 75 every time, or do you have to be able to handle any number less than 100?
 

Bassyhead

Diamond Member
Nov 19, 2001
4,545
0
0
You're going to need some sort of arithmetic in order to do what you want. I'm assuming the OP is only dealing with 2 digit numbers (00 to 99) as each display seems to only be capable of displaying a single digit. The example I gave will work from 0-99, though someone else may have a simpler solution.
 

iamtrout

Diamond Member
Nov 21, 2001
3,001
1
0
Nevermind all. I figured it out. We were supposed to use a ROM and basically program in all the input combinations and its outputs. Too bad our prof never told us what a ROM was :roll:
 

ColdFusion718

Diamond Member
Mar 4, 2000
3,496
9
81
lol I remember taking a class like that, 2 days before the project is due, my dumbass professor says "oh by the way, I forgot to tell you guys that you can use ROMs on this assignment." People were doing all sorts of crazy sh!t before he gave us this piece of info. A lot of the stuff I've seen were pure ingenuity. Proves to show that to see who the smart/invent students are in an engineering class, you give them a dumb teacher who leaves out information.