TWiT Throwback (Audio)

Coding 101 1: Coding 01100101


Listen Later

Welcome to Coding 101 - It's the TWiT show that gives YOU the knowledge to live in the wonderful world of the programmer. This week we are taking a look at binaries.

You can also check out the transcript of the show here.

Ivory Tower: Binary

Binary is a base 2 system. With the total sum based on each binary value being either "on" or "off" (Which is why it's called "BINARY") 2-bit Binary Value

  • Each BIT can have 2 values - on or off - 1 or 0
  • Each Bit is worth the value of powers of 2, counting up from 0.
  • We count the values from right to left.
  • With two bits, that means the "first" bit can be worth either "1" (2(0)) or "0" while the second bit can be worth "2" (2(1)) or "0"
  • If we have a value of 00 = 0 :: 11 = 3 :: 10 = 2 :: 01 -1
  • If we have a n 8-bit value the maximum value will be (1+2+4+8+16+32+64+128) 255
  • Let's Break Down the process!

    • If I had a value like 10101010... what logic would I use to get to the DECIMAL value? (170)
    • I would create a "Total" Variable
    • I would look at each position, from left to right, giving each position a value of 0-7
    • If the value was "0" then I would skip to the next value.
    • If the value was "1", then I would raise 2 to the power of that position, then add that value to the "Total" Variable
    • Once I have no more values to calculate, I would report my total.
    • Code Warrior: Lou Maresca

      Get the Code!

      Hosts: Fr. Robert Ballecer, SJ and Shannon Morse

      Guest: Louis Maresca

      Get in Touch With Us!
      • Subscribe and get Coding 101 automatically at TWiT.tv!
      • Follow PadreSJ and Snubs on Twitter
      • Download or subscribe to this show at https://twit.tv/shows/coding-101.

        Bandwidth for Coding 101 is provided by CacheFly.

        Sponsor:

        • lynda.com/c101
        • ...more
          View all episodesView all episodes
          Download on the App Store

          TWiT Throwback (Audio)By TWiT

          • 4
          • 4
          • 4
          • 4
          • 4

          4

          4 ratings


          More shows like TWiT Throwback (Audio)

          View all
          Total Leo (Audio) by TWiT

          Total Leo (Audio)

          202 Listeners

          TWiT News (Audio) by TWiT

          TWiT News (Audio)

          78 Listeners

          All TWiT.tv Shows (Audio) by TWiT

          All TWiT.tv Shows (Audio)

          355 Listeners

          TWiT Events (Audio) by TWiT

          TWiT Events (Audio)

          8 Listeners

          Total Mikah (Audio) by TWiT

          Total Mikah (Audio)

          3 Listeners

          Untitled Linux Show (Audio) by TWiT

          Untitled Linux Show (Audio)

          7 Listeners

          Host-Read Ads (Audio) by TWiT

          Host-Read Ads (Audio)

          3 Listeners