Decimal input to biniary code

An area for asking questions, making suggestion, share ideas and place circuit examples.
Post Reply
Tamar1984
Posts: 2
Joined: Tue Apr 30, 2019 10:12 am

Decimal input to biniary code

Post 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
User avatar
admin
Site Admin
Posts: 407
Joined: Sun Jun 14, 2009 10:53 pm
Contact:

Re: Decimal input to biniary code

Post 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.
Tamar1984
Posts: 2
Joined: Tue Apr 30, 2019 10:12 am

Re: Decimal input to biniary code

Post 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?
User avatar
admin
Site Admin
Posts: 407
Joined: Sun Jun 14, 2009 10:53 pm
Contact:

Re: Decimal input to biniary code

Post by admin »

What is the prefixed number? Can you explain what you need in more details? maybe attach your circuit?
Post Reply