Binary

From Hackepedia
Jump to navigationJump to search

Binary is machine language that the processor can understand. Usually it is produced after assembling assembler. Many people know of binary by its form of ones and zeros, which are represented as bits that are either set or not.

Here is a small primer on how to read the bits in a Byte. There is 8 bitpositions in a byte and they are usually read from right to left where on the far right resides the least significant bit and on the left the most significant bit. With every bit position the value doubles.

33 == 0010 0001
2   == 0000 0010
128 == 1000 0000
192 == 1100 0000

An odd number always has the least signifant bit (1) set.

65 == 0100 0001

Text in binary would look like this, (ABC)

 41 hex 42 hex 43 hex
 0100 0001 0100 0010 0100 0011

And so on. It's rare that anyone who programs cares about how the binary looks, unless you listen to the 4.2 OpenBSD song and wanted to know what it described.