Long word
In some microprocessors where a word is taken to mean say 16 bits, a long word would mean a group of twice the normal length, in this case 32 bits.
Kilobyte (Kb or KB or kbyte)
A kilobyte is 1024 or 210 bytes. In normal use, kilo means 1000 so a kilovolt or kV is exactly 1000 volts. In the binary system, the nearest column value to 1000 is 1024 since 29=512 and 210=1024. The difference between 1000 and 1024 is fairly slight when we have only 1 or 2 Kb and the difference is easily ignored. However, as the numbers increase, so does the difference. The actual number of bytes in 42 Kb is actually 43 008 bytes (42×1024). The move in the computing world to use an upper case K to mean 1024 rather than k for meaning 1000 is trying to address this problem.
Unfortunately, even the upper or lower case b is not standardized so tread warily and look for clues to discover which value is being used. If in doubt use 1024 if it is to do with microprocessors or computers. Bits often help to confuse the situation even further. 1000 bits is a kilobit or kb. Sometimes 1024 bits is a Kb. One way to solve the bit/byte problem is to use kbit (or Kbit) and kbyte (or Kbyte).
Megabyte (MB or Mb)
This is a kilokilobyte or 1024×1024 bytes. Numerically this is 220 or 1 048 576 bytes. Be careful not to confuse this with mega as in megavolts (MV) which is exactly one million (106).
Gigabyte (Gb)
This is 1024 megabytes which is 230 or 1 073 741 824 bytes. In general engineering, giga means one thousand million (109).
Terabyte (TB or Tb)
Terabyte is a megamegabyte or 240 or 1 099 511 600 000 bytes (Tera = 1012).
Petabyte (PB or Pb)
This is a thousand (or 1024) times larger than the Terabyte so it is 1015 in round numbers or 240 which is pretty big. If you are really interested, you can multiply it out yourself by multiplying the TB figure by 1024.
In each case, choose the best option.
1 Typical operating voltages of microprocessors are:
(a) 0 V and 1 V.
(b) 3.3 V and 5 V.
(c) 220 V
(d) 1024 V.
2 The most mobile electrical charge is called:
(a) a proton and has a positive charge.
(b) a voltage and is always at one end of a conductor.
(c) an electron and has a negative charge.
(d) an electron and has a positive charge.
3 The denary number 600 is equivalent to the binary number:
(a) 1001011000.
(b) 011000000000.
(c) 1101001.
(d) 1010110000.
4 When converted to a denary number, the binary number 110101110:
(a) will end with a 0.
(b) must be greater than 256 but less than 512.
(c) will have a base of 2.
(d) will equal 656.
5 A byte:
(a) is either 1024 or 1000 bits.
(b) is simply a collection of 16 bits.
(c) can vary in length according to the microprocessor used.
(d) can have the same number of bits as a word.
3. Hexadecimal – the way we communicate with micros
The only problem with binary is that we find it so difficult and make too many errors. There is little point in designing microprocessors to handle binary numbers at high speed and with almost 100% accuracy if we are going to make loads of mistakes putting the numbers in and reading the answers.
From our point of view, binary has two drawbacks: the numbers are too long and secondly they are too tedious. If we have streams and streams of ones and zeros we get bored, we lose our place and do sections twice and miss bits out.
The speed of light in m/s can be written in denary as 29979245910 or in binary as 100011101111001111000010010112. Try writing these numbers on a sheet of paper and we can be sure that the denary number will be found infinitely easier to handle. Incidentally, this binary number is less than half the length that a modern microprocessor can handle several millions of times a second with (almost) total accuracy.
In trying to make a denary number even easier, we tend to split it up into groups and would write or read it as 299 792 459. In this way, we are dealing with bite-sized portions and the 10 different digits ensure that there is enough variety to keep us interested. We can perform a similar trick with binary and split the number into groups of four bits starting from the right-hand end as we do with denary numbers.
1 0001 1101 1110 0111 1000 0100 1011
Already it looks more digestible.
Now, if we take a group of four bits, the lowest possible value is 00002 and the highest is 11112. If these binary numbers are converted to denary, the possibilities range from 0 to 15.
Counting from 0 to 15 will mean 16 different digits and so has a base of 16. What the digits look like really doesn’t matter. Nevertheless, we may as well make it as simple as possible.
The first 10 are easy, we can just use 0123456789 as in denary. For the last six we have decided to use the first six letters of the alphabet: ABCDEF or abcdef.
The hex system starts as:
Hex | Denary |
---|---|
0 | 0 |
1 | 1 |
2 | 2 |
3 | 3 |
4 | 4 |
5 | 5 |
6 | 6 |
7 | 7 |
8 | 8 |
9 | 9 |
A | 10 |
B | 11 |
C | 12 |
D | 13 |
E | 14 |
F | 15 |
When we run out of digits, we just put a 1 in the second column and reset the first column to zero just as we always do.
So the count will continue:
10 | 16 |
11 | 17 |
12 | 18 |
13 | 19 |
14 | 20 |
15 | 21 |
16 | 22 |
17 | 23 |
18 | 24 |
19 | 25 |
1A | 26 |
1B | 27 |
1C | 28 |
1D | 29 |
1E | 30 |
1F | 31 |
20 | 32 |
… and so on.
It takes a moment or two to get used to the idea of having numbers that include letters but it soon passes. We must be careful to include the base whenever necessary to avoid confusion. The base is usually written as H, though h or 16 would still be acceptable.