YouTube2Text

[CS61C FA20] Lecture 02.1 - Number Representation: Intro, Bits can be anything — Transcript

by CS 61C Departmental · 929 words · 154 segments · language en · Watch on YouTube

Full transcript

  1. 0:01welcome to 61c's lecture on
  2. 0:03number representation
  3. 0:05[Applause]
  4. 0:08great to have you here let's jump right
  5. 0:09in
  6. 0:11one of the things you're going to see
  7. 0:12about data that lives all around us
  8. 0:15is that typically the data begins in the
  9. 0:18analog domain
  10. 0:19and we need to convert it to the digital
  11. 0:21domain so the real world is analog
  12. 0:23everything you hear and see
  13. 0:25and smell is all analog it's all fine
  14. 0:28real numbers but you need to then
  15. 0:29convert those to digital numbers to be
  16. 0:30able to work with them and do things
  17. 0:32with them
  18. 0:32so in order to convert analog data to
  19. 0:35digital data we must do two things
  20. 0:37number one we have to sample so that
  21. 0:39means we have to ask it
  22. 0:41at every time step what's your value and
  23. 0:44that usually is a regular interval
  24. 0:46and for example for music for cds that's
  25. 0:4844
  26. 0:49100 times a second we're asking it what
  27. 0:51its height is
  28. 0:53but then the problem is the height might
  29. 0:54come out at some fractional number and
  30. 0:56we need to then quantize that which
  31. 0:58means divide it up
  32. 0:59kind of in in in its amplitude
  33. 1:03and you ask it what is its amplitude on
  34. 1:04some yardstick and so
  35. 1:06we will we'll see how to do this this
  36. 1:09lecture this series of lectures
  37. 1:11we divide it up into a 16 bit number so
  38. 1:13that's
  39. 1:142 to the 16 possible tick marks on a
  40. 1:17yardstick
  41. 1:18or 65 536 different tick marks and we
  42. 1:21say
  43. 1:22where are you and some of these might
  44. 1:23not exactly align so it kind of snaps to
  45. 1:25the closest tick mark to figure what
  46. 1:26that is
  47. 1:27when we're all done we have a set of
  48. 1:29samples and then we can work with that
  49. 1:31so that's how we bring
  50. 1:32analog data into the computer
  51. 1:36however not all not all data digital
  52. 1:38data is necessarily boring analog
  53. 1:40sometimes you can just go into a system
  54. 1:42and create
  55. 1:44art create music create videos create
  56. 1:46sound completely without any analog
  57. 1:49reference so here are two pictures uh by
  58. 1:52pavre pavre is a animation software
  59. 1:55a rendering software really amazing free
  60. 1:57open source go check it out
  61. 1:58and here are two beautiful pictures that
  62. 2:00existed only in the author's head and
  63. 2:02the artist's head
  64. 2:03until they hear are at beautiful digital
  65. 2:05images so they don't necessarily
  66. 2:06come from the outside world they can
  67. 2:08sometimes come from the pure digital
  68. 2:10world
  69. 2:12the big idea in this first lecture this
  70. 2:14first snippet of this module
  71. 2:16is that bits can represent anything they
  72. 2:19can represent characters well i've got
  73. 2:2126 characters
  74. 2:22a through z so i'm going to use five
  75. 2:24bits two to the five is 32 and so i'll
  76. 2:26have one of these bit
  77. 2:27patterns for each of those characters
  78. 2:29well actually probably i want to have
  79. 2:31uppercase and lowercase and some
  80. 2:32punctuate punctuation
  81. 2:34so let's do seven bits and in fact we'll
  82. 2:37reserve eight bits for it but actually
  83. 2:39we'll only use seven bits for all the
  84. 2:40characters we'll need
  85. 2:41and that's called ascii american
  86. 2:43standard code for information
  87. 2:44interchange
  88. 2:46then you're gonna say well dan that's a
  89. 2:47little uh american centric and i'd say
  90. 2:50you're right that that's what the a was
  91. 2:51for and ascii
  92. 2:53so it turns out that a group of folks
  93. 2:55says well how about my language and my
  94. 2:56language and my language and so
  95. 2:58a consortium came around called unicode
  96. 3:00with the idea that
  97. 3:02you would have the ability to store all
  98. 3:04the world's symbols
  99. 3:05used in all the world's languages it
  100. 3:07turns out there's a lot of those symbols
  101. 3:09so they then had different versions they
  102. 3:11have an 8-bit a 16-bit and a 32-bit
  103. 3:13version of unicode
  104. 3:15and so you can now by the way emojis are
  105. 3:17also part of unicode it's pretty cool so
  106. 3:19you can have many many symbols all the
  107. 3:21chinese characters all the
  108. 3:23you know all the other languages
  109. 3:24characters uh
  110. 3:26beautiful beautiful language beautiful
  111. 3:27patterns of how those characters
  112. 3:29represented
  113. 3:29all represented in in the unit code
  114. 3:31probably you need more than eight bits
  115. 3:33for that though
  116. 3:34you also represent logical values zero
  117. 3:37is false one is true is a common way we
  118. 3:38do that
  119. 3:39how about colors here's r g and b red
  120. 3:41green and blue
  121. 3:42uh zero zero is red zero one is green
  122. 3:45and
  123. 3:46one one is blue that's just to make it
  124. 3:48there you can you don't have to have it
  125. 3:49in order by the way you could do that
  126. 3:50that way
  127. 3:51locations addresses commands emotions
  128. 3:56happy is zero zero kind of grumpy is
  129. 3:59zero one
  130. 4:00you can end up having a bit pattern for
  131. 4:01everything anything you can
  132. 4:03itemize you can digitize it's pretty
  133. 4:05exciting so
  134. 4:06here's the big idea of this lecture
  135. 4:08memorize this remember i'm gonna have
  136. 4:10a couple of times during this lecture
  137. 4:11i'm gonna say memorize this this is one
  138. 4:13of those times
  139. 4:14n bits is two to the n things
  140. 4:18or said another way if i've got two to
  141. 4:20the n i've got some number of things how
  142. 4:22many bits do i need
  143. 4:23i take the log base two of that and take
  144. 4:25the ceiling of that and that's the
  145. 4:26number of bits i need okay so
  146. 4:2828 26 character 26 letters as example 26
  147. 4:31letters okay
  148. 4:32log base 2 of that is 4 point something
  149. 4:35the ceiling of that is 5 therefore i
  150. 4:37need 5 because 2 to the 5 is 32
  151. 4:39so it's the biggest power of 2 bigger
  152. 4:40than the number of things i want to
  153. 4:41store
  154. 4:42all right see the next video

About this transcript

This page contains the full transcript of [CS61C FA20] Lecture 02.1 - Number Representation: Intro, Bits can be anything by CS 61C Departmental, generated from the public captions YouTube serves with the video. The transcript has 929 words across 154 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to translate the transcript into 100+ languages.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.