DEV Community

loading...

CS Series 👩‍🚀 #3 : How computers stores information : Deep Dive Part 2 ⚡

Abdulrahman
Software Engineer. Checkout my Twitter 👇
・2 min read

How computers stores information : Deep Dive Part 2 ⚡

image

  • types of data in the real world
    • Text
    • Numbers
    • Video
    • Audio
    • Image
  • We understand now how computers store information in the form of binary digits, but how we map an image or any type of data to a binary digit ?

Number Systems

  • humans invented a system to represent quantity of things based on symbols, and these symbols are numerical symbols (0, 1,2,3...). The most common number systems are: Base 10 and Base 2
  • In the human world we use base 10 to describe day to day numerical needs, and it's base 10 because we have 10 possible values 0-9 , why only base 10 not 12 or 13 ? most likely because we have 10 fingers ! so we started to count things based on our fingers.
  • but in the computer world we don't have 10 possible values. remember , we only have 0s and 1s . So the second most common number system is base 2, which only holds to possible values 0 or 1
  • So any type of data, either it's an image , text, number or anything will be converted to binaries , and from binaries we could store that binary, process it, and convert it back to original human readable form whether it's audio or any other types of data
  • In this illustration we can see how we represent numbers in both system (Base 10, and base 2)

04

Text

  • a text is just a collection of characters, and representing characters in computers happens in 2 steps
    • A way to map a character to a number
      • We use ASCCI for able
      • Also we use Unicode table for representing all languages and and their symbols
    • convert the number to a binary

Images

  • Images are collection of colors, and representing colors in a computer happens in 2 steps
    • A system to map a color to number
      • Most common system is RGB
    • converting the number to binary digits

Video

  • A Video is a collection of images

Extra resources :

Discussion (0)