@
@
@Twitt2019-08-01 21:31:39
Programming
@Twitt, 2019-08-01 21:31:39

Is it possible to convert to binary from decimal on the fly?

All my life I have been able to convert to binary from the decimal system as follows: I took a number, constantly divided by 2, then took the remainder, which was always 0 or 1 (the standard scheme, in general, which is taught).
But I want to learn how to translate without a leaflet, on the fly. I heard about some BCD (8421) weights and did not understand anything. Is someone familiar with such a methodology, and can explain "on the fingers" how to do it? Or maybe someone has a simpler tactic for transferring from 10 to 2 SS?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
U
uvelichitel, 2019-08-01
@uvelichitel

Or maybe someone has a simpler tactic for transferring from 10 to 2 SS?
Most IT people know powers of two by heart, like a multiplication table. For example "1001" is 512+256+128+64+32+8+1 or 1024-16-4-2-1 which is 1111101001 This is pretty easy to count in your head without paper.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question