Everything2
Near Matches
Ignore Exact
Full Text
Everything2

decimal to binary

created by ariels

(idea) by ariels (2.7 d) (print)   ?   (I like it!) 1 C! Mon Apr 16 2001 at 12:47:30

So you want to convert a number (decimal) into binary, do you now? Here's the pencil and paper method us old farts got taught back when the Earth was still young. As an example, we'll convert 163 to binary as we go along.

Take your number and repeatedly divide by 2 (until you reach 1, when there's really not much point in going on (but you can!)). Ignore any remainders (we'll come back later to pick them up).

163
81
40
20
10
5
2
1
Now read the column of numbers from the bottom up; write down (from left to right!) a "1" for every odd number, a "0" for every even number.

In our case, this yields 101000112=16310.


(idea) by Suvrat (5.8 mon) (print)   ?   (I like it!) 1 C! Wed Apr 18 2001 at 12:34:39

Here is how to convert a decimal number with a decimal point to binary(which was taught to us when the Earth had aged a bit). As an example we'll convert .875 as we go along.

1)Take your number and multiply it by 2. So when we do this here we get 1.75 .
2)If the result of the previous step is greater than 1, put down a 1 wherever you are writing the binary expansion, and subtract 1 from the result. So here, we put down a 1 and subtract 1 to get .75
3)Now repeat this process. In general the binary expansion may not terminate so you can take as many places as you like. In this case we multiply by 2 to get 1.5 . So we put down another 1 and take .5 as the new number. Multiplying again we get another 1 but the new number is 0.
So
(.875)10 = (.111)2 .
There, thats it!


printable version
chaos

interesting number bases Binary to Hexadecimal Convert base ten to binary Binary to decimal
Binary to Octal How to convert binary to English in your head digital root 163
binary Listen to me! Converting real numbers to binary Why Unix?
repeating decimal Convert any number to decimal semimajor axis and semiminor axis anding
and subtraction decimal Divide
binary clock Writing a program
Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.
  Epicenter
Login
Password

password reminder
register

Everything2 Help

Cool Staff Picks
Look at this mess the Death Borg made!
Methods of execution
beta
Moulin Rouge
community supported agriculture
shotgun house
Helping your kid brother die
My hands, a backrub, a cup of tea, my shoulder, my lips, my silence
War is peace, Freedom is slavery, Ignorance is strength
McDonnell Douglas DC-10
Multiple Sclerosis
Black beans and rice
Teenage Dirtbag
Sephiroth
New Writeups
antigravpussy
One fly amongst many(person)
sam512
Moon Base Shackleton, 1978(fiction)
Pavlovna
toy boy(person)
XWiz
tear jerker(review)
Heitah
Anarchy is Order(idea)
jessicaj
July 26, 2008(dream)
Berek
ABBA(person)
devolution
k-hole(place)
Nadine_2
The Sound Of Madness(review)
SwimmingMonkey
Conversations with Fo Fo, the Loneliest dog in Purgatory(fiction)
locke baron
lynx(thing)
Simulacron3
Reality, Dimensions and the Natural Ontology(essay)
SubSane
Making Love to a 9-Foot Woman(person)
Ouzo
Thoughts(idea)
antigravpussy
I fall silent, listening. The breadcrumbs are talking about us(person)
This affordable entertainment brought to you by The Everything Development Company