10/10/10

lunaticbinge

Well-known member
42.jpg
 

awkwardamanda

Well-known member
Here:
Binary/Decimal/Hexadecimal Converter
Type in 42 into the decimal space. It's 101010.

^ Doesn't work for me. I used this one: TRANSLATOR, BINARY
Edit: I'll take you're word for it anyway. I hate math.

Ok, so let me get this straight: 101010 represents the decimal number 42, but 0011010000110010 represents the actual string "42" (i.e. 4 and 2 separately)?

Typed "42" into the decimal box:
42a.jpg


Typed "42" into the dec/char box:
42c.jpg


And typed "42" into the text box (note the space in the middle):
42b.jpg


And for the record, typing "0011010000110010" into the binary box gives this:
13362.jpg



Ok, seems to make sense now. Feel free to clarify if I've missed something.
 
Last edited:

Ragle

Active member
42 is the ultimate answer to the great question of life in the book, Hitchhiker's Guide to the Galaxy
 

awkwardamanda

Well-known member
Yup, right on the money. :)

Each digit in a binary number equals either 0 or 1, times 2 raised to a power. The rightmost digit always starts at 2 raised to the 0 power (2^0) which is decimal value 1. Then the next digit is 2^1 (decimal value 2), then the next is 2^2 (decimal value 4), etc.

So 101010 = (1 * 2^5) + (0 * 2^4) + (1 * 2^3) + (0 * 2^2) + (1 * 2^1) + (0 * 2^0) = 32 + 0 + 8 + 0 + 2 + 0 = 42

Also, decimal value for ASCII "4" is 0011 0100, and for ASCII "2" is 0011 0010, like you said.

The actual ASCII character for decimal value 42 is the wildcard character *. :D

Thx. *nerdsnort*:D
 
Top