#### ArakelTheDragon

- Joined Nov 18, 2016

- 1,362

It is not possible that we have two "1s" because I need this to drive two 7 segment displays. The first four bits start the first digit and they can be from "0" to "9" and the same goes for the second 4 bits. The idea is this:

FirstDigit = Display%10;

SecondDigit = Display/10;

for(i=0; i<=10; i++)

{

if(FirstDigit == i)

BinaryFormOfFirstDigit = TableForFirstDigits

*;*

if(SecondDigit == i)

BinaryFormOfSecondDigit = TableForSecondDigits

if(SecondDigit == i)

BinaryFormOfSecondDigit = TableForSecondDigits

*;*

}

FinalFormOfThePORTCOutput = ?

output_c(FinalFormOfThePORTCOutput);

I hope that from "SecondDigit/10" I get a result without a floating point, but I am not certain because my compiler gives int "8 bits" not "4 bits" or "1 bit."

Meaning "25/10 = 2", not "25/10 = 2.5"

That would give us a varibale with the first four bits filled as: 0b1000 0000

And the second variable would be 0b0000 1000

When I sum both I should get: 0b 1000 1000

Which is equal to 88 or 8 at the first dysplay and 8 at the second display.The first four bits never mix with second, they just need to be in one variable.}

FinalFormOfThePORTCOutput = ?

output_c(FinalFormOfThePORTCOutput);

I hope that from "SecondDigit/10" I get a result without a floating point, but I am not certain because my compiler gives int "8 bits" not "4 bits" or "1 bit."

Meaning "25/10 = 2", not "25/10 = 2.5"

That would give us a varibale with the first four bits filled as: 0b1000 0000

And the second variable would be 0b0000 1000

When I sum both I should get: 0b 1000 1000

Which is equal to 88 or 8 at the first dysplay and 8 at the second display.The first four bits never mix with second, they just need to be in one variable.