Bit & Bytes
A bit is a smallest unit of information that a computer can work on and can take two values “1” and “0”, although sometimes depending on context the values of “true” and “false” are used. On most modern computers, we do not work directly on bits but on a collection of bits, sometimes called a word, the smallest of which is a byte. Today, a byte by default means 8 bits, but technically it can range from 4 to 10 units. The odd values are from either old or experimental CPU architectures that aren’t really in use anymore. To be precise, many standards use octet to mean 8 bits, but we’ll use the more common byte. Modern CPUs operate on much larger word sizes: the term 32-bit microprocessor means the CPU operates primarily on 32-bit words in one clock cycle. It can , of course, operate on 8-bit words, but it doesn’t mean it happens any faster. Many CPUs also have special instructions that sometimes can operate on larger words, such as SSE and similar instructions for multimedia, as well as vector processing , such as on the PowerPC.
A byte has a natural numeric interpretation as an integer from 0 to 255 using base 2. Bit n represents the value 2n, and the value of the byte becomes the sum of these bits. The bits are laid out exactly as expected for a numeric representation, with bit 0 on the right and bit 7 on the left, but the layout is backward when compared to Western languages.
(b7b6b5b4b3b2b1) = 27b7+26b6+25b5+24b4+23b3+22b2+21b1+20b0
good post. but very short on the topic.