Skip to content

Instantly share code, notes, and snippets.

@laurenhavertz
Last active December 21, 2015 17:59
Show Gist options
  • Save laurenhavertz/6343796 to your computer and use it in GitHub Desktop.
Save laurenhavertz/6343796 to your computer and use it in GitHub Desktop.
SCIENCE
  • base 10 = [0,1,2,3,4,5,6,7,8,9] => 10 options

  • base 2= [0,1] => 2 options

  • more numbers represented in base 10

  • computer is complicated system of on and off gates

  • opening and closing certain switches

goes in spots of 2(squared)

0000 => 0:1 => 8, 0:2 => 4, 0:3 => 2, 0:4 => 1

  • 00 = 0
  • 01 = 1
  • 10 = 2
  • 11 = 3
  • 100 = 4
  • 101 = 5
  • 110 = 6
  • 111 = 7
  • 1000 = 8
  • 1001 = 9

Binary to decimal

decimal to binary

for number 65 => odd

  • 65/2 = 32 => even

  • 32/2 = 16 => even

  • 16/2 = 8 => even

  • 4/2 = 2 => even

  • 2/2 = 1 => odd

  • translates to: 1000001 where odd = 1 and even = 0

for number 43 => odd

  • 43/2 = 21 => odd

  • 21/2 = 10 => even

  • 10/2 = 5 => odd

  • 5/2 = 2 => even

  • 2/2 = 1 => odd

  • translates to: 101011

HEX NUMBERS( Base 16)

0- 0000 1- 0001 2- 0010 3- 0011 4- 0100 5- 0101 6- 0110 7- 0111 8- 1000 9- 1001 A- 1010 B- 1011 C- 1100 D- 1101 E- 1110 F- 1111

addition and subtraction

  • 0 + 0 = 0
  • 0 + 1 = 1
  • 1 + 0 = 1
  • 1 + 1 = 10
  • 1 + 1 + 1 = 11

101 +111


1100

11111 01110 +11111


1001100

0 - 0 = 0 1 - 0 = 1 0 - 1 = 1 1 - 1 = 0 1 - 1 - 1 = -1

101 -010


011

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