Table of Contents

1 Bits and bytes

Taken from a chat with Stefany Newman.

Roughly you can say that one letter is represented by one byte. But of course compression and unicode encoding can change that. On most systems there are 8 bits in a byte. But older systems also had 5, 6, 7, or even 9 bits in a byte. (I figure we standardised on 8 bits in a byte because computer scientists prefer powers of 2). Many people (including me) prefer to use the term "octet" over "byte", since byte can be ambiguous, and "Octet" always indicates 8 bits.

There is an interesting system in development that uses 6 or 9 bit bytes. It uses Forth as programming language, so the developers are very concerned with efficiency. https://www.infoq.com/presentations/power-144-chip

Bits were used to describe the smallest discrete unit of information possible on a conventional computer, and many other systems.

1.1 Examples

Like an opened/closed punch in a punch-card, a pin on the drum of a little music box, the boom-barrier at a railroad crossing, or the signal that a doorbel-button sends to the ringer. Train-semaphore, some other optical telegraph-lines, the little flags on rural mailboxes in the US, are all examples of systems that use bits for communication.

1.2 Discussion

The great advantage is that there are two extreme correct stages, and all other stages are incorrect, thus indicating an error or no attempt to communicate. Think of the simple flag protocol: No flag: People are sleeping or post is unmanned; Full flag: Post is manned, alert, and operational; Half-mast: Something is wrong, come check it out.

Now this works very well in electronics. Since it is rather easy to measure a voltage difference, that measurement is used for communications. You can measure a voltage difference, for example, with a lamp, a ringer, a ticker (electric-telegraph), a crystal (LCD), or by having it smash an electron into some phosphorus (CRT).

It is also easy to generate a voltage difference, for example with a battery or other stable power source in combination with: a switch (keyboard, electric-telegraph), a potentiometer (volume-button), capacity (touchscreen), or light-sensitive resistor (elevator sensor). Other ways to generate a voltage difference are photovoltaic cells (digital camera), crystals (electric lighter), or magnets and a coil (microphone).

Most of those ways to generate a difference can generate a whole range of voltages. And indeed, it is possible to do electronic calculations over a range. In fact there used to be weather-prediction computers who used that system.

But since it requires very precise components with very low tolerance for faults, those systems were not very suitable for mass-production and miniaturisation. So for both computing as well as electrical communication (binary) digital systems became more popular.

1.3 Digital electronics

It is easy to measure the difference between 0 and 5 Volt for example. 0V: Lamp does not light up, 5V: Lamp does light up. And with electronic components (OpAMP, power source), it is easy to push every electrical signal in between to one of these extremes. That's why early computing scientists decided to standardise on extremes, so we have binary units of information.

We'll call those "bits". They can be part of communication, or of storage (punch-card, electronic memory-cell, magnetic memory). A single bit can be used to represent the number 0 or 1. Usually 0V is used for 0, and +1V, +3V, or +5V is used for 1.

1.4 Coding numbers from multiple bits

Multiple bits together can be used to represent bigger numbers. To represent the numbers 0, 1, 2, and 3, at least two bits are needed.

  • 0: 0V and 0V
  • 1: 0V and 5V
  • 2: 5V and 0V
  • 3: 5V and 5V

or: 0: 00, 1: 01, 2: 10, 3: 11 To represent letters on modern electronic systems, they are encoded as numbers. To represent all the capital 26 latin letters, at least the numbers from 0 to 25 should be able to be represented. To encode 26 numbers, at least 5 bits are needed:

  • 0: 00000
  • 1: 00001
  • 2: 00010
  • 3: 00011
  • 8: 01000
  • 9: 01001
  • 10: 01010
  • 15: 01111
  • 16: 10000
  • 17: 10001
  • 24: 11000
  • 25: 11001

And we even have room to encode the numbers from 26 to 31! In online communication, we can use those numbers to represent codes to switch between Latin, Cyrillic, Greek, Upper/Lower case, numbers, or whatever we want. See for example the Baudot code. That code was invented long before the words bit and byte, but it is actually a binary code that uses 5-bit bytes.

1.5 ASCII

ASCII is a standard from the '60's to code the most common characters in the english language and in electronic storage and communication in a standardised digital manner. Using only 7 bits per character.

Author: Matthieu Peeters

Created: 2017-09-15 Fri 09:29

Validate