Page 1 of 1

Decimal input to biniary code

Posted: Tue Apr 30, 2019 10:17 am
by Tamar1984
Hello All,

I build a simple circuit that checks whether the entered binary value corresponds to a previously specified value and if that is correct, it gives a 1 as an output. This part is working corretly
But now I would like to simplify the input by being able to give a decimal input. How do I do that the easiest?

Thanks in advance

Re: Decimal input to biniary code

Posted: Tue Apr 30, 2019 2:26 pm
by admin
Generally it is pretty complicated. You start by reading about floating point numbers. For example this article: https://www.cprogramming.com/tutorial/f ... ation.html
On the other hand if you really want only decimal numbers it might be easier. If you can say that you always have exactly so many digits after the dot you can reuse our whole number circuit.

Re: Decimal input to biniary code

Posted: Wed May 01, 2019 8:09 am
by Tamar1984
Allright that would be to complicated for this case. The only timing the circuit needs to do is checking if the input (number from 0-9) is part of a prefixed number. I have got it working with a binary input but i wanted to make it look beter with decimal input.
But the circuit needs to be simple.

So i don't there is an easy way to do it?

Re: Decimal input to biniary code

Posted: Wed May 01, 2019 2:18 pm
by admin
What is the prefixed number? Can you explain what you need in more details? maybe attach your circuit?