Aim: It is important to be able to explain the different interpretations that may be associated with a pattern of bits.
A bit is a binary digit, a 0 or 1.
Inside the computer there are lots of electronic circuits which pass electrical signals to each other i.e. when they need to communicate or when you want it to do something. For example if you press the letter A on a keyboard an electrical signal is sent to the processor. We press the letter 'A' but the CPU (Central Processing Unit) has interpreted it as 10000001 - this is because the electrical signals inside the computer can only be 0 or 1. These 0 and 1s are known as Binary Digits or BIT for short. Anything the computer interprets is either a 0 or 1 or a combination. Everything that is represented in a computer, such as an instruction, a word, a number or any complex data structure is ultimately stored as a sequence of bits. In order to be able to interpret every key on the computer both CAPITALS and lowercase, it has to use combinations of 0s and 1s. Every letter and number has a code called an ASCII code that represents it. For example, a capital A=10000001 and a lowercase letter 'a' = 11000001.
Byte - A byte is a collection of 8 bits.
CONCEPT OF A WORD
A 'Word' is the number of bits that can be processed as a single unit by the processor.
A Word is a collection of bytes. An integer may be stored in a computer word of 2 or 4 bytes, a floating point number in a word of 5 bytes, a string in a varying number of words, and a file as a collection of words. The reason that binary is used is because the electronic components that make up a computer are two state devices. The two states being 0 and 1, or off and on, or tur and false, or high and low.
Wordlength - In the context of computing a wordlength is the width of data pathways within the computer i.e. the number of bits in a word. Some personal computers are referred to as 32-bit or 64-bit machines. This means their wordlength is 32 or 64 bits. A 'word' in this context is the number of bits which can be addressed or transferred as a single unit.
There are different types of data that can be held in a Word such as text, numbers, graphics, videos and sound.
A WORD may represent the following sorts of data
An Integer e.g. 18 is represented as 0000 0000 0001 0010
A single (real number) e.g. 1.5 is represented as 0000 0001 0110 0000 0000 0000 0000 0000 0000 0000
A Boolean e.g. true is represented as 0000 0000
Machine code instructions e.g. MOV CX, AX is represented as 1000101111001000
Other sorts of data that can be represented in a number of words are:-
Pictures in a variety of formats e.g. BMP, PCX, TIF, EPS, JPEG, GIF
Video Clips e.g. AVI, MP4
Sound e.g. WAV, MIDI, MPEG, MP3
1
Byte or small number
An ASCII character
An EBCDIC character
2
1 Unicode character
1 integer
1 boolean
2 ASCII or EBCIDIC characters
1 machine code instruction
4
1 Long Integer
1 machine code instruction
5
1 real number data type
1 K
Clipart Picture
100 K
Sound
1 M
Video Clip
High Resolution Picture
There are different interpretations which can be associated with a pattern of bits in a 32 bit word such as:-
4 ASCII characters
2 UNICODE characters
4 integers
A real number
A machine code instruction
IP address
1 long integer, etc.
1K is short for 1 Kilobyte = 1024 bytes
1 M is short for 1 Megabyte = 1045876 bytes