Logout

--- Binary representation ---

2.1.9

Define the terms: bit, byte, binary, denary/decimal, hexadecimal.

Teaching Note:

Sample Question:

sdfsdfsf

JSR Notes

bit - a binary digit; one single piece of binary information - either a 1 or a 0 as represented by some way of representing 2 and only 2 things, for example:

• on a hard drive, a spot that is a certain magnetism (0), and a spot which is a bit more magnetic (1),
• in RAM, an individual circuit switch which is off (0), or on (1),
• in the registers of the CPU, the same sort of switch off (0) or on (1),
• on the surface of a CD/DVD, a tiny bump (0), or a tiny flat spot (1)

byte - a certain number of bits, taken together to represent various things. Usually bytes are 8-bit (though not necessarily). A single 8-bit byte can represent one of 256 different things (with two digits, the calculation for the number of combinations of 8 digits is 2 ^ 8 = 256). The different things being represented could be different characters, or different number, or different colors.

BTW, the way the computer knows how to interpret bytes (as characters or colors etc.) is by a text header preceding the bytes, which communicates the context. ("What follows is colors"... "What follows is sound samples" etc.)

binary - a numbering system which uses only two digits (usually 0 and 1). A binary numbering system is handy to communicate the various binary systems that computers work with. Ultimately, computers at their most fundamental level deal with information in the binary form of switches on and off, or spots magnetic or a bit more magnetic, etc. The sets of things which we communicate to computers (characters, numbers, colors and sounds) can therefore be represented by us with the binary (0 and 1) numbering system. The letter 'A', for example, in an 8-bit character set (like ASCII) is 0010 0001, and 'B' is 0010 0010, etc.

denary/decimal - denary is an antiquated term for decimal. Decimal is a numbering system which used ten symbols - usually 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. This is the numbering system we are used to using - most likely because we as humans have ten fingers on which to count. Each place the decimal numbering system is a power of ten. So the first place is the 10 ^ 0s (or the1s place), the second place is 10 ^ 1 (or the 10s place), the third place is 10 ^ 2 (or the 100s place) and so on. Decimal is easier for us, as humans to work with, since we are more used to it, so often binary values will be dealt with by us in their converted decimal form. Therefore, often we will refer to the character 'A' as being number 65 (binary 0010 0001) of the ASCII code set. (But remember that the computer will deal with the 'A' in its binary representation.)

hexadecimal - a numbering system which uses sixteen symbols - usually 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F. This is a convenient numbering system with which to accurately represent very large values in a limited space. So memory addresses, for example, are most often represented in hexadecimal. In a 32 bit memory system, there are around 4,000,000,000 addresses, and in a 64-bit memory system there are 16,000,000,000,000,000,000 addresses. Those individual address numbers get unwieldy to be writing again and again. But with hexadecimal, the 32-bit addresses would maximally be FFFF FFFF, and in the maximum 64-bit address would be FFFF FFFF FFFF FFFF - both of which take less space to write than their decimal equivalents. Hexadecimal values are often distinguished from decimal and binary by having an x in front of them. For, for example, xFFFFFF, or x1234.

...those "definitions" kept on getting more and more involved. But for a 1 mark question on an IB CS exam, a good, one sentence definition should be enough - so the simple, introductory phrases above, plus a bit more context would suffice.

JSR Notes - FORMER CURRICULUM - 3.2.2 Outline the meaning of the terms bit (b) and byte (B) and their derivatives.:

"Bit" comes from "binary digit", and the derivative of "byte" (b) is "binary term". And note that a byte is almost always 8 bits, but not necessarily so. An example of non 8-bit bytes is 9-bit bytes that use the 9th bit for parity checking - more on this later.
From the teaching notes, be careful when converting a bit amount to a byte amount or vice versa. 1 MB, for example, contains approximately 8 million bits.
And do make sure you can properly convert between the different prefixes - often I'm astounded that students can't do this. For example, approximately how many kB are in a GB? Well, a kB is around 1000, and a GB is around a billion, and so, 1000 divided into a billion is approximately a million.

JSR Notes - FORMER CURRICULUM PROBABLY NOT NECESSARY, but could help with understanding: - and also with 2.1.10.