Hello World in Binary

"hello world" in binary is 01101000 01100101 01101100 01101100 01101111 00100000 01110111 01101111 01110010 01101100 01100100

11 bytes, 88 bits, one 8-bit ASCII code per character.

"hello world" is the traditional first program: when you pick up a new programming language, the first thing you make it do is print this phrase. The habit traces back to Bell Labs in the early 1970s, when Brian Kernighan used the greeting in his internal tutorial for the B programming language. He carried it into a 1974 C tutorial, and the 1978 book The C Programming Language, written with C's creator Dennis Ritchie, made it the default opening move for every language since. People sometimes credit the earlier language BCPL, but Kernighan has said the B tutorial was the origin.

Encoded in ASCII, the phrase is eleven characters, and the space between the words counts: it gets its own byte, sitting in the middle of the string like a fence post. Eleven characters at eight bits each makes 88 binary digits, which you can check against the byte-by-byte table below.

There is a pleasing circularity in writing this one out in 0s and 1s. The phrase exists to prove a language works, and binary is the language everything else compiles down to. On a mug or a laptop sticker, it greets the machine in the machine's own tongue. For the plain greeting without the "world", see hello in binary.

Byte by byte

CharacterDecimalBinary
h10401101000
e10101100101
l10801101100
l10801101100
o11101101111
space3200100000
w11901110111
o11101101111
r11401110010
l10801101100
d10001100100

The same phrase in hex and decimal

Binary is not the only way to write the bytes. In hexadecimal, "hello world" is:

68 65 6C 6C 6F 20 77 6F 72 6C 64

And as decimal byte values:

104 101 108 108 111 32 119 111 114 108 100

More words in binary

Browse the full collection at words in binary, or convert any text to binary with the translator.

FAQ

What is hello world in binary?

Lowercase "hello world" is 01101000 01100101 01101100 01101100 01101111 00100000 01110111 01101111 01110010 01101100 01100100. That is eleven 8-bit bytes, one per character, with the space getting its own byte in the middle. Each byte is the character's ASCII code written in base 2.

How many bits is hello world in binary?

Eighty-eight. The phrase has eleven characters counting the space, and standard ASCII encoding gives every character exactly eight bits. Capitalizing the H and W keeps the length the same; only the two bytes for those letters change.

Why do programmers write hello world first?

Tradition dating to Bell Labs in the early 1970s. Brian Kernighan used the greeting in his tutorial for the B language, then in a 1974 C tutorial, and the 1978 book The C Programming Language cemented it. Printing one line proves your setup works before you write anything harder.