03-10-2018 11:50 AM
Good, I would like to know how to convert a number between 0 and 10, in its 8-bit digital representation (using the algorithm of successive approximations and with loop for or while).
I attach an example image with 4 bits.
I hope you can help me.
03-10-2018 11:59 AM - edited 03-10-2018 12:16 PM
Hi Jose,
is this some kind of homework?
Did you get this task to learn LabVIEW?
You need a (FOR) loop, a shift register and some comparision function (as you already have learned here). I guess you can figure the needed algorithm on your own (or even got that from your teacher)!
When you want to cheat you could just use an integer indicator set to base 2 display mode…
Btw. for numbers between 0 and 10 you only need 4 bits.
03-11-2018 01:39 PM
Yes, I know I have to use a displacer, a for and comparators, but my doubt would be how to use the comparators in this case.
03-11-2018 01:45 PM
@jose_1819 wrote:
Yes, I know I have to use a displacer, a for and comparators, but my doubt would be how to use the comparators in this case.
Well, try a few things. You should be able to figure it out!
03-14-2018 11:33 AM
To sum this up, here's a quick implementation for 8 bits. (Of course you could calculate the input constants based on N and i inside the loop)