Decoding the new programmes of study for computing


Data and data representation



Download 142.38 Kb.
Page4/8
Date17.05.2017
Size142.38 Kb.
#18397
1   2   3   4   5   6   7   8

3.Data and data representation


Much of the power of computers comes from their ability to store and manipulate very large quantities of data very quickly. The way in which this data is stored and manipulated can make enormous differences to the speed, robustness, and security of a computer system.

Not much of this section is directly relevant to the KS1/2 POS, but I hope that you may nevertheless find it useful.


3.1Bits


Data in a computer is (almost) invariably represented as bits (short for “binary digit”). A bit is either a 1 or a 0.

It’s easy to see how bits can represent a black and white picture. For example, here is a crude picture of a table, represented as a 5x4 grid of “pixels”. If we display 1’s as black and 0’s as white, we get a picture.



0

0

0

0

0

1

1

1

1

1

0

1

0

1

0

0

1

0

1

0

If we devoted two bits to each pixel we could represent shades of grey, like this:

The two bits

Shade

0 0




0 1




1 0




1 1




Now we can draw a table with light grey legs and dark grey feet:

00

00

00

00

00

11

11

11

11

11

00

01

00

01

00

00

10

00

10

00

If I want more shades of grey, I can use more bits for each pixel. Two bits can represent four shades, three bits can represent eight:

The three bits

Shade

0 0 0




0 0 1




0 1 0




0 1 1




1 00




1 0 1




1 1 0




1 1 1




Four bits can represent 16, and so on. The number of shades we can represent doubles each time we add one more bit.

We can represent colour pictures too, of course, using three groups of bits for each pixel, one for the degree of redness, one for blueness, and one for greenness.


3.2Bits for everything


Bits can represent things other than pictures.

  • Bits can represent characters, like the ones on this page. Again we need a table to tell us which bit-pattern stands for which character. Here is part of the ASCII table, just one such convention:

    Bit pattern

    Character that it stands for







    0100 0001

    A

    0100 0010

    B

    ...




  • Bits can represent formatting information in a document. For example, this document has characters, but also some indication of which words are in bold, where the bullet points are, and so on.

  • Bits can represent sounds. Just imagine measuring the height of an audio waveform 10,000 times a second. How might we measure each height? Just like the shades of grey, we can do so with a binary number. That sequence of 10,000 binary numbers each second describes the waveform quite well, and it is just a bunch of numbers; more bits.

  • Bits can represent videos: a video is just a sequence of pictures.

  • Bits can represent numbers (see the next section).

In short, bits can stand for, or represent, absolutely anything. When you stop to think about it, that’s quite remarkable. Bits are a kind of universal medium for representing information.


Download 142.38 Kb.

Share with your friends:
1   2   3   4   5   6   7   8




The database is protected by copyright ©ininet.org 2024
send message

    Main page