In Computers; Bits, Bytes & Words are the core concepts.
Bits – binary digits
Computer memory stores the data in bits. Each bit stores the value either 0 or 1. Inside the Computer, there are electronic switches that store the bit values; either 0 or 1. If the switch is OFF means, that represents 0 & the switch is ON means, that represents 1. That means Computer can understand the data in “0”s and “1”s. We normally use bits to represent processor architecture or design; a 32-bit processor, 64-bit processor, etc. 64-bit processor can do the computations faster than a 32-bit processor.
There must be a data transfer between Computer Memory (RAM – Random Access Memory) and the Computer Processor (CPU). The data transfer happens through BUSes. Each BUS carries an N-number of bits; depending on the Computer Architecture. Each BUS has wires to transfer the bits; 16-bit BUS carries 16-bits at a time, and it has 16 wires to transfer each bit. BUSes are used to carry the information between one Component to another Component in the Computer.
Mostly, we don’t directly deal with the Computer bits; there are computer languages that allow us to directly deal with the computer bits. “C” language provides some features to allow the programmers to directly deal with the bits.
How do we represents the data other than 0 & 1; example, characters (‘A’, ‘h’ etc,.).? The answer is Byte; another term, we use in the computer terminology is Bytes.
Bytes
A byte is a grouping of consecutive bits. Usually, 8-bits represents a Byte. Generally, we use Byte(s) to represent characters; each byte can store the values from 0-255. That means, we can store one of the characters from 0-255; in 1 Byte.
The most common term we use in Computers terminology is Bytes. Computer Programs read & write the Bytes from the Memory; also read and write the Bytes to the File Storage, and for the data processing use Bytes; file sizes will display in Bytes and etc.,
How internally Bytes store that data.? Simple, it is Bits. The Byte representation of a character ‘A‘ is:
ASCII Character value of ‘A’ is 65. Bit representation (binary representation) of ‘A’ in a Byte is below:
0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 |
Note that, it is not compulsory that 8-bits are used for a Byte in all the Systems. The number of bits used for a Byte is depended on the System Architecture. Commonly we use 8-bits for a Byte.
WORDs
WORDs are also consecutive bits or bytes. This term is mostly used for CPU registers. Generally, each WORD has a length of 16-bits. CPU Registers are used to store a small piece of information while doing the calculations or processing the data. These are helpful to improve the performance of the system while doing the calculation or processing.
Note that, there are Systems that use 8-bit, 32-bit, 64-bits, 128-bits for WORDs. Commonly we use 16-bits for a WORD. The number of bits used for a WORD is purely depending on the System Architecture or design.
// Malin
I had my first computer class over 30 years ago and I wish that the textbook, along with others, had this information in it from the beginning. I have never seen this explanation before and it makes things very understandable now.
Thank You