Binary: How low can you go?

 In this lecture, Chris spoke about binary representation, the lowest level of data representation.

I've always been enamored by graphical representation using bits and bytes, as I've dealt a lot with RGB for web development and graphic editing, so I was pleasantly surprised to see this topic.

From what I learnt, several types of data may be encoded in binary:

  • Binary
    • uses 'bits', which stands for binary digits (that second part blew my mind!) 
    • either 0 or 1
    • resistant to errors
  • Integers
    • stored as groups of 8 bits, known as 'bytes'
    • starting from right to left at 0, each bit represents a value of 2^(bit number)
    • e.g. 10010111 = 1x27 + 0x26 + 0x25 + 1x24 + 0x23 + 1x22 + 1x21 + 1x20 = 151
  • Fixed-point
    • encoded the same way as integers, but the bits to the right of the decimal point are 'fractional'
  • Floating-point
    • encoded in three parts: the sign bit, the mantissa, and the exponent
    • 0 represents a positive sign bit, whereas 1 is negative
    • common floating-point formats are defined in IEEE 754 standard
  • Sound
    • represented as a series of time-based air pressure measurements, called Pulse Coded Modulation (PCM)
    • PCM is either compressed as lossless (full recovery) or lossy (higher compression)
    • psycho-acoustic compression is used to have high compression with minimal impact 
  • Graphics
    • colors are transmitted as RGB combinations (red, green, blue) 
    • images are displayed as groups of pixels, each pixel with a different RGB combination
    • RGB goes up to (255, 255, 255), using 8 bits per pixel
    • like sound, there are lossless and lossy compression schemes
    • psycho-visual compression is used to have high compression (like JPEG)

Personally, I learnt a lot doing research on this topic, especially regarding sound encoding. I can't wait for the next lecture!

Comments

Popular posts from this blog

The Difference of SVE2 (Project Stage 3)

So I examined another open-source project... (Project Stage 2)

The World of Open Source! (Week 1 Lab)