YouTube2Text

[CS61C FA20] Lecture 24.1 - Caches I: Binary Prefix — Transcript

by CS 61C Departmental · 1,990 words · 317 segments · language en · Watch on YouTube

Full transcript

  1. 0:10oh
  2. 0:11sorry i didn't see you there didn't see
  3. 0:13you there hold on let me
  4. 0:14just pass this on to my friend welcome
  5. 0:17to cs61c
  6. 0:19cache is part one great to see you as
  7. 0:22always
  8. 0:23let's get right in so we're first going
  9. 0:25to learn about something called the
  10. 0:26binary prefix
  11. 0:28this is really important as you're
  12. 0:29learning about caches and as you're
  13. 0:30learning about how to work with
  14. 0:32um two to the blank blank what does that
  15. 0:35even mean
  16. 0:35how to think about how many bits and
  17. 0:37code a certain space all those things
  18. 0:38were learned
  19. 0:39in this next very short video so let's
  20. 0:41go back in time
  21. 0:48and these were commonly used s.i system
  22. 0:51international i believe it's called
  23. 0:53uh prefixes that we use for things so if
  24. 0:56you had
  25. 0:57uh i got a a kilo oh dude i got a key
  26. 1:00this is like uh
  27. 1:01scarface i got a key if you got a key of
  28. 1:03something that's a kilo it's a thousand
  29. 1:05of something
  30. 1:06but in fact people were using a kilo to
  31. 1:08describe powers of two you know they had
  32. 1:11you notice that the difference there's a
  33. 1:12big difference between
  34. 1:14only a very small difference between
  35. 1:15something you know here's base 10 a kilo
  36. 1:18of something
  37. 1:18and this thing that we didn't have a
  38. 1:20name for uh 1024 adds a little bit
  39. 1:23but as you continue to grow well how
  40. 1:24about a mega i got a mega something it's
  41. 1:26a million
  42. 1:27but you know here is you know it started
  43. 1:30at 48 000. now it's a little bit bigger
  44. 1:31than that so
  45. 1:32and as you as you continue to grow
  46. 1:34notice it here it's you're now off by a
  47. 1:36full
  48. 1:37say 20 so there's an issue and we never
  49. 1:40really had a solution
  50. 1:42um to this there is a historical note
  51. 1:45you see there in the second bullet which
  52. 1:46is
  53. 1:47hard disk manufacturers started years
  54. 1:50and years ago by using powers of two you
  55. 1:52notice powers of 10 are smaller than
  56. 1:53powers of two
  57. 1:54and so they'd say you know i i have a
  58. 1:57hard drive that was a 10
  59. 1:58meg hard drive they used to be two to
  60. 2:01the
  61. 2:0220 times 10 so uh
  62. 2:05that was 10 of mega which is 2 to the 20
  63. 2:08bytes
  64. 2:09and they realized wait if we actually
  65. 2:12use the proper terminology mega is a
  66. 2:15million and a million is smaller than
  67. 2:16this 2 to the 20.
  68. 2:17so they decided to then move to using
  69. 2:20that so in fact if you get a 10
  70. 2:22meg drive and nobody gets to me you know
  71. 2:2310 gig drive now 10 terabyte drive
  72. 2:25it's not the left column of powers of
  73. 2:28two it's it's the right column of powers
  74. 2:30of 10.
  75. 2:30and so they realize they can be a little
  76. 2:32cheap on things so when you format it
  77. 2:33not only
  78. 2:34formatting is also some overhead but the
  79. 2:35point is you don't get a drive that's
  80. 2:37actually into power too
  81. 2:38even raw bits it's the power of 10
  82. 2:40powers of two and we also use
  83. 2:41in networking we use uh the base 10
  84. 2:45for networking so if i have a gigabit
  85. 2:47network it is a
  86. 2:4810 to the ninth bits per second that's
  87. 2:50that's always been that way and that's
  88. 2:51fine so
  89. 2:52network transmission is base 10 hard
  90. 2:54riser base 10 everything else caches
  91. 2:56memory everything else is base two and
  92. 2:59so
  93. 3:00we want to make sure we talk about this
  94. 3:01in the right way i can't just say a kilo
  95. 3:03how much how big is your cash a kilo
  96. 3:05it's a kilobyte well do you mean a
  97. 3:06thousand bytes or do you min 1024
  98. 3:08let's actually make sure we have a
  99. 3:09distinct word for that we can't just
  100. 3:10keep using kilo
  101. 3:12we can't overlook keep overloading kilo
  102. 3:15enter the iec um international
  103. 3:18electro technical commission in 1999 a
  104. 3:21big deal introduced these
  105. 3:22binary prefixes and the idea was they
  106. 3:25kept the same
  107. 3:26columns as you had before k m as you see
  108. 3:29up top k
  109. 3:29m g t p e z y except
  110. 3:33that they added a little bit of an i
  111. 3:35here so each of these you see there's a
  112. 3:36little i in front of them
  113. 3:38um and in fact the way they pronounce
  114. 3:40them
  115. 3:41is um it's like the kilo and the mega
  116. 3:44and they give you so the first two
  117. 3:45letters are the same
  118. 3:46but then you add bi for binary to make
  119. 3:48it distinct
  120. 3:49but rather than call it bi so rather
  121. 3:51than kid buy
  122. 3:53me buy they wanted it maybe they sounded
  123. 3:55better
  124. 3:56to call it b so it's maybe kibby mebby
  125. 3:59gibby
  126. 4:00tabby pebby eggs be zebby and yabby
  127. 4:02that's how you pronounce them
  128. 4:03okay and now we have distinct meanings
  129. 4:05and that's just great so now we can be
  130. 4:06just saying oh i got a 10
  131. 4:08teddy drive i know i you know i'm 10 2
  132. 4:10to the 2 to the
  133. 4:11uh 40 not 10 to the
  134. 4:1512. so that's great much much better
  135. 4:17there
  136. 4:20you're going to ask yourself well how do
  137. 4:21you memorize these things if i say that
  138. 4:22and you want to be able to make a
  139. 4:23connection between
  140. 4:24what these what the or at least the
  141. 4:26order of it is so this is a fun
  142. 4:28challenge that i offered to 61c students
  143. 4:30years ago
  144. 4:31and i said come up with a mnemonic come
  145. 4:34up with a way to remember this sequence
  146. 4:36that no one else has i think this is a
  147. 4:38berkeley invention this is the way to
  148. 4:39remember these so
  149. 4:40feel free to use any of these 10 i'm
  150. 4:41going to show you whichever one kind of
  151. 4:43rings true to you so let's jump right in
  152. 4:46kid meets giant texas people exercising
  153. 4:49zen like yoga
  154. 4:50and i try to actually give credit to the
  155. 4:51student who did that i want to give them
  156. 4:52anybody with the last name but i gave
  157. 4:54their first name
  158. 4:54um and in the challenge i made sure the
  159. 4:57first two letters are the same first two
  160. 4:58letters everybody so you can
  161. 4:59once you say ki make any word with ki
  162. 5:01star uh you know it's a me star et
  163. 5:04cetera
  164. 5:04okay kind men give ten percent
  165. 5:07extra zestfully that's pretty cool
  166. 5:10some of these are pretty good kissing
  167. 5:12mentors gives testy persistent
  168. 5:14extremists
  169. 5:15zealous youthfulness kindness means
  170. 5:19giving
  171. 5:20teaching permeating excess zeal
  172. 5:23yourself i feel i feel like connected to
  173. 5:26that one myself
  174. 5:27killing messengers don't kill the
  175. 5:29messenger right killing messages give it
  176. 5:30gives terrible people
  177. 5:32exactly zero yo you have to do the hand
  178. 5:34yo either the hand
  179. 5:35i know the help this is the yohan i'm up
  180. 5:37i'm giving some gang sign out there
  181. 5:39um kindergarten means giving teachers
  182. 5:42perfect examples of zeal in youth i love
  183. 5:45that
  184. 5:48kissing mediocre giraffes teaches people
  185. 5:50to expect zero from you
  186. 5:52kinky mean girls teach people exciting
  187. 5:56zen yoga kissing mel gibson
  188. 5:59teddy pendergrass exclaimed zesty yo
  189. 6:03that's the one i remember actually when
  190. 6:05i'm thinking is it z y i'll actually say
  191. 6:07that one i'll say
  192. 6:08i'm revealing a little bit of my head
  193. 6:10here i actually say that one when i try
  194. 6:12to remember it if i
  195. 6:13said easy is it easy y-e-y-z i use that
  196. 6:15one if i get stuck
  197. 6:16and here's my favorite one and it's not
  198. 6:18the one i use but it's my favorite one
  199. 6:19kissing me gives 10
  200. 6:21extra zeal in youth so tell that to your
  201. 6:23friends tell their friends
  202. 6:24not talking about kissing dan but
  203. 6:25kissing yourself you know hey
  204. 6:27ralph what sue kissing me gives 10 extra
  205. 6:30zeal in youth
  206. 6:31okay anyway whatever you decide to use
  207. 6:34pick one of these
  208. 6:35pick make your own up but remember this
  209. 6:37sequence
  210. 6:38this year where all of our uh all of our
  211. 6:40exams are going to be open book but in
  212. 6:42the future
  213. 6:42we might go back to closed book and we'd
  214. 6:44like to be able to have you memorize
  215. 6:46this so this is a good thing
  216. 6:47what is 2 to the 34 how many bits to
  217. 6:49address that uh how many bits to address
  218. 6:512.5 tebby b
  219. 6:52uh heavy bytes of something so these are
  220. 6:55two questions that you might
  221. 6:57um want to be able to answer quickly and
  222. 6:59in fact i
  223. 7:00encourage you as a 621c soon-to-be
  224. 7:02graduate
  225. 7:03to be able to be fluent in this space so
  226. 7:06the way i think of it
  227. 7:07is i want you to memorize these two
  228. 7:09tables in fact i'm going to actually
  229. 7:10have a little have a little sound here
  230. 7:12to say please do think about memorizing
  231. 7:15these tables and the way
  232. 7:16to do this the way to to know how to do
  233. 7:18this is the following
  234. 7:202 to the xy x is the tens column and y
  235. 7:22is kind of the ones column
  236. 7:25i start with the ones column and it's
  237. 7:27really easy to memorize this one let me
  238. 7:28just grab
  239. 7:29so you want to be memorizing this this
  240. 7:31sequence right here
  241. 7:32okay so zero one two
  242. 7:36four eight sixteen thirty two we're up
  243. 7:38five now six
  244. 7:39sixty four i'm not even looking i'm
  245. 7:40closing my 64 128
  246. 7:42256 is eight that's another important
  247. 7:45one because eight bits
  248. 7:46used to control 256 different color
  249. 7:49channels for a
  250. 7:50standard old-school monitor including
  251. 7:52the ppms you worked with
  252. 7:53um if you did uh 61c this semester when
  253. 7:56we did that
  254. 7:57assignment that had ppms 9 5 12
  255. 8:00and then 10 well 10 is the next one okay
  256. 8:02so that's all you remember so those nine
  257. 8:04and then you go back to the kibi member
  258. 8:07gibby
  259. 8:08tabby pebby eggs be zebby yabby and you
  260. 8:10have that sequence
  261. 8:11and that is the x that's the tens column
  262. 8:13so you hit very quickly ready
  263. 8:1534. in my brain i'm saying 4
  264. 8:18is 16. okay see look i'm looking 4 is 16
  265. 8:22okay 30s well the 30s is gibby so i'd
  266. 8:25say 16 gibby
  267. 8:26did i get it right i did okay that's
  268. 8:29pretty cool
  269. 8:30so let's do another one uh i almost feel
  270. 8:33like i have a random thing here we go
  271. 8:3547 128 tabby
  272. 8:38pretty cool 64. man i got a 64-bit
  273. 8:42address space
  274. 8:43how many bytes of memory can i access
  275. 8:4564.
  276. 8:4616xb wow that's pretty cool
  277. 8:50so continue to think about that and now
  278. 8:51the reverse of that is the following
  279. 8:53if i say i want to be able to address
  280. 8:552.5 tabi bytes
  281. 8:57well how many is that well what you do
  282. 8:58is you take 2.5
  283. 9:00and you take the ceiling of that what's
  284. 9:01the next biggest power of 2 above that
  285. 9:022.5 is bigger than 2 so it would be 4.
  286. 9:05so i'd say 4 that'd be 2. okay so i'm
  287. 9:07going to say
  288. 9:08something two tabby is four so i'd say
  289. 9:1142
  290. 9:12i think you need 42 bits to address 2.5
  291. 9:15tubby bytes
  292. 9:16because 42 bits is 4 tepe and 4 tibia is
  293. 9:19the next big power of 2
  294. 9:20above 2.5 tubey bytes okay so
  295. 9:23we often call this the iec numbers but
  296. 9:25here binary prefixes is the right name
  297. 9:27so from now on this is the beginning
  298. 9:29lecture on caches
  299. 9:30and this lecture really could have gone
  300. 9:32in fact maybe
  301. 9:33i'm moving flying these lectures into
  302. 9:35small pieces could have really gone the
  303. 9:37first lecture because
  304. 9:38it would be fun to have this kind of be
  305. 9:39fluent about this from the beginning of
  306. 9:41the semester but you don't really need
  307. 9:42it until caches and so this is in the
  308. 9:44cache lecture but i hope in the future
  309. 9:46this lecture's in the front and
  310. 9:47feel free to ignore this little bit
  311. 9:48about it if it actually is in the front
  312. 9:49why we should move it because it already
  313. 9:51has moved
  314. 9:51if we happen to do that okay you
  315. 9:53understand that but it's fine all right
  316. 9:54we'll see the next lecture and we'll
  317. 9:56learn more about caches thanks

About this transcript

This page contains the full transcript of [CS61C FA20] Lecture 24.1 - Caches I: Binary Prefix by CS 61C Departmental, generated from the public captions YouTube serves with the video. The transcript has 1,990 words across 317 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.