Skip to content

Instantly share code, notes, and snippets.

@bushidocodes
Last active November 1, 2016 14:37
Show Gist options
  • Save bushidocodes/badd751798d70dace8f5c275a586ffee to your computer and use it in GitHub Desktop.
Save bushidocodes/badd751798d70dace8f5c275a586ffee to your computer and use it in GitHub Desktop.

Image Encoding

  • Triads of 8-bit unsigned ints for RGB values
  • 8 bits is ~ 256 possible brightnesses per channels
  • 24-bit bitmaps allow for significantly more levels of brightness

Audio Encoding

  • Raw Pulse-Code Modulation
  • Normal digital audio uses 44,100 samples per second, where each sample has an amplitued of 16-bit
  • To play in a hearable way, the audio data needs to go back through "Digital Analog Conversion" (DAC)

Video Encoding

  • Combination of Image Encoding and Audio Encoding techniques.

Machine Code and Assembly

  • Each CPU architecture has a proprietary instruction set of binaries codes that triggeers the processor to perform operations
  • The CPU speaks machine code, but this is written in a more human readible syntax called Assembly Language or Assembler

Compilers

  • Higher level langauges are written in abstract data types and control structures.
  • A compiler takes this higher level language as an input and produces machine code.
/// Create a Pointer
char ch = 'c'; // declare and instatiate 'c' as data type of char with a value of 'c'
char t; // declare a char named t. It hasn't been instantiated
char *chptr = &ch; // create a pointer named *chptr that points at the ch char
t = *chptr; // 



Higher 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment