Category: Data Representation

N5 – CS – Data Representation

Describe and exemplify the use of binary to represent positive integers.

Convert from binary to denary and vice-versa.

  • An integer is a whole number.
  • Binary is how a computer system stores data. Everything stored by a computer is stored using
  • A Binary Digit (bit) is either a 0 or a 1
  • 37 =
128 64 32 16 8 4 2 1
0 0 1 0 0 1 0 1
  • Add the column headers where there is a 1 to go from binary to decimal so the example above is 32+4+1=37

 

Describe floating point representation of positive real numbers using the terms mantissa and exponent.

  • Floating point representation is for storing a number with a decimal point.
  • The mantissa and exponent are stored as separate numbers within the computer’s memory. The computer recreates the number for calculations when it needs to.
  • For the number 0.10111 x 21011 Mantissa =10111 Exponent=1011

 

Describe extended ASCII code (8-bit) used to represent characters.

  • Each character is given an 8-bit ASCII Code, this is a binary number.
  • For example – V = 86 = 01010110

 

Describe the vector graphics method of graphic representation for common objects:

  • Vector graphics are made up of objects. Each objects is described by attributes – e.g. the instructions to draw the shape.
  • Rectangle – (height, width, x, y, fill colour, line colour)
  • Ellipse – (cx, cy, rx, ry, fill colour, line colour)
  • Line – (x1, y1, x2, y2, line colour)
  • Polygon any shape with 3 of more sides – (x1, y1, x2, y2, x3, y3, fill colour, line colour)

 

Describe the bit-mapped method of graphics representation.

  • Computers stores, in binary, each pixel. The greater the number of pixel the greater the resolution and file size of the image. Number of bits per pixel depends on the number of colours in the image – more colours, more bits.