Free Samples

by Danu on July 3, 2008

in Living in the Cloud

New to my blog? You may want to think about subscribing to be notified of new posts. Thanks for visiting!

In June 2008 I announced I was writing a book. The working title is 'Living in the Cloud'. It is a book intended to help people understand computers, the internet and other technology they use every day. I plan to have the book finished by the end of 2008, and will post excerpts as I write them for feedback and criticism. The following is one such excerpt:


Free Samples

With their ability to work through millions of ones and zeros per second, microprocessors opened up new possibilities for putting the binary system to use. We've already seen how ones and zeros are used to produce text, but what about the sounds, images and movement we experience on computers and other digital devices? These are all created using the binary system too.

Although computers are machines, they share a similar design philosophy with nature in that big things are made up of lots of little things put together in different ways. Everything in nature, no matter how complicated, can be traced back to its component atoms. From simple building blocks there are infinite possibilities. Creation is a matter of finding patterns and sequences that work. Digital technology works by breaking something into its smallest parts and then reconstructing it as a whole.

I will try to explain how this occurs in the simplest language I can while staying as accurate as possible. If it gets a little technical don’t be too concerned. It isn’t vital to understand the inner workings of a computer to use one, but it’s surprisingly helpful and does wonders for self-confidence.

Consider sound, which is caused by vibrations through the air or other substances at frequencies which we can hear. Sound is analogue - it is a continuous signal. A music CD is digital - it is a sequence of numbers. How is it possible to take sound waves out of the air and translate them to a piece of plastic and metal that plays music when you put it in a CD player?

The answer is a process called sampling. To explain in simple terms - a microphone listens to the continuous sound waves (called the waveform) and records the audio frequency at regular intervals, creating a flow of numbered values, which, if played back in the right order through a speaker, will reproduce the original sound. The microphone is literally taking samples of the sound. The number of samples it takes each second is called the sampling rate. Although the result will never be as pure as the original waveform, if enough samples are taken, the difference should be imperceptible to the human ear.

Here is a diagram of the digital audio process:

The numbered values recorded during the sampling process, are, needless to say, written in binary.

Interestingly, to calculate the number of samples necessary to make the digital audio recording imperceptible from the original, a formula called the 'Nyquist-Shannon sampling theorem' is used. It states that the ideal number of samples should be twice as many as the total range of frequencies being sampled. Since humans can hear frequencies in the range 20hz - 20,000hz, the ideal sampling rate for audio recording should be around 40,000 samples per second, or 40khz. In fact, the sampling rate of compact discs is 44.1khz. Samples on a CD are represented by a series of bumps burnt into the disc by a laser, called pits and lands. When the disc is playing, the laser runs along the track, reflecting the light differently when it reaches each pit. This is how a CD player understands binary code.

While each second of digital audio is comprised of thousands of tiny parts called samples, each digital image is comprised of thousands or even millions of coloured dots called picture elements, or pixels. Each pixel is a particular colour, and, like the ASCII text system, each colour has a corresponding number, written in binary. The computer reads the binary code for each pixel, translates it into the correct colour and then draws each pixel on the screen, creating the complete image.

Computer screens produce colour by combining red, blue and green light at different levels of intensity. This is called RGB colour. RGB is called an additive colour model. This is because if red, green and blue light are all added together at their highest intensity, the result is white.

Printers use a different model called CMYK in which colours are produced by mixing cyan, magenta, yellow and black inks. Whereas in RGB, all the colours mixed together create white, in CMYK, cyan, magenta and yellow mixed together creates black. CMYK is called a subtractive colour model because you start with a white page and subtract the white by mixing the other colours together on top of it. This difference in screen and print colour models explains why printed images don't always look the way they do on screen.

In the early days of computers, only one screen colour could be produced, usually white or green. Thus each pixel was represented in binary by a single 1 or 0. If the pixel was set to 1, the computer would draw colour there. If it was set to 0, it would stay black. Later there would be 2-bit colour, two ones or zeros together for a combination of up to 4 colours. Programmers could choose from two amazing colour palettes - cyan, magenta, black and white, or red, green brown and black. Game designers went wild with the possibilities:

As computing power and graphics processing improved, so too did the range of colour options. Today, the standard for colour reproduction is called 24-bit or true colour. It is produced by combining 256 possible shades of red with 256 shades of green and 256 shades of blue, making 16,777,216 colour combinations, enough to make an image appear natural. The 256 shades are represented in binary using the numbers 0-255, each taking 8 bits to write. The individual 8-bit values of red, green and blue combined therefore explains why this is called 24-bit colour.

A digital camera samples the light reflecting off sensors in the lens and converts it to RGB values. A 5 megapixel camera records images using 5 million pixels. Each pixel takes 24 bits to produce. That means a single 5 megapixel image can take up to 15,000,000 bytes of information to produce, or 14.31Mb. One second of video footage is made up of 25 or more still images. With that amount of computing power required for a single task, it begins to become clear how much work the computer is doing behind the scenes.

{ 0 comments… add one now }

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Previous post: Australia leads the way in missed opportunities

Next post: Strength in Numbers