(Answer) (Category) SCO(Caldera) UnixWare 7/OpenUNIX 8 FAQ : (Category) General Information :
How do I convert decimal numbers to binary numbers?
To convert decimal to binary, draw yourself the following chart, and I'll convert 184 to binary:
       7    6    5    4      3   2   1   0      <-- two to this power 
128 64 32 16 8 4 2 1 <-- equals the number below it

To convert 184, I think to myself:

     *  184 has at least a 128 in it, so I put a one in the 128's column.
1
* 184-128 = 56 , which is less that 64, so there are no 64's. Put a 0 in the 64's columns and a one in the 32's instead.
1 0 1
* 56-32 = 24, so I need a 16 and an 8 to make 24, no 4's, 2's, or 1's.
1 0 1 1 1 0 0 0
So 184 = 10111000. I hope that wasn't too confusing.

<mschalit@pacbell.net>
gerberb@zenez.com

[Append to This Answer]
Previous: (Answer) What's a MB? What's a Mb? What's a KB and a Kb?
Next: (Answer) How do I convert binary to decimal?
This document is: http://www.zenez.com/cgi-bin/ou8faq.org/faq?file=45
[Search] [Appearance]
This is a Faq-O-Matic 2.721.