YouTube2Text

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

by CS 61C Departmental · 2,059 words · 328 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've got a key
  28. 1:03of something that's a kilo it's a
  29. 1:05thousand of 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:11um we can't overlook keep overloading
  102. 3:13kilo
  103. 3:15enter the iec um international
  104. 3:18electro technical commission in 1999 a
  105. 3:21big deal introduced these
  106. 3:22binary prefixes and the idea was they
  107. 3:25kept the same
  108. 3:26columns as you had before k m as you see
  109. 3:29up top k
  110. 3:29m g t p e z y except
  111. 3:33that they added a little bit of an i
  112. 3:35here so each of these you see there's a
  113. 3:36little i in front of them
  114. 3:38um and in fact the way they pronounce
  115. 3:40them
  116. 3:41is um it's like the kilo and the mega
  117. 3:44and they give you so the first two
  118. 3:45letters are the same
  119. 3:46but then you add bi for binary to make
  120. 3:48it distinct
  121. 3:49but rather than call it bi so rather
  122. 3:51than kid buy
  123. 3:53me buy they wanted it it's a maybe they
  124. 3:55sounded better
  125. 3:56to call it b so it's me b kibby mebby
  126. 3:59gibby
  127. 4:00tabby pebby eggs be zebby and yabby
  128. 4:02that's how you pronounce them
  129. 4:03okay and now we have distinct meanings
  130. 4:05and that's just great so now we can be
  131. 4:06just saying oh i got a 10
  132. 4:08teddy drive i know i you know i'm 10 2
  133. 4:10to the 2 to the
  134. 4:11uh 40 not 10 to the
  135. 4:1512. so that's great much much better
  136. 4:17there
  137. 4:20you're going to ask yourself well how do
  138. 4:21you memorize these things if i say that
  139. 4:22and you want to be able to make a
  140. 4:23connection between
  141. 4:24what these what the or at least the
  142. 4:26order of it is so this is a fun
  143. 4:28challenge that i offered to 61c students
  144. 4:30years ago
  145. 4:31and i said come up with a mnemonic come
  146. 4:34up with a way to remember this sequence
  147. 4:36that no one else has i think this is a
  148. 4:38berkeley invention this is the way to
  149. 4:39remember these so
  150. 4:40feel free to use any of these 10 i'm
  151. 4:41going to show you whichever one kind of
  152. 4:43rings true to you so let's jump right in
  153. 4:46kid meets giant texas people exercising
  154. 4:49zen like yoga
  155. 4:50and i try to actually give credit to the
  156. 4:51student who did that i want to give him
  157. 4:52some anybody with the last name but i
  158. 4:54gave her their first name
  159. 4:54um and in the challenge i made sure the
  160. 4:57first two letters are the same first two
  161. 4:58letters everybody so you can
  162. 4:59once you say ki make any word with ki
  163. 5:01star uh you know it's a me star et
  164. 5:04cetera
  165. 5:04okay kind men give ten percent
  166. 5:07extra zestfully that's pretty cool
  167. 5:10some of these are pretty good kissing
  168. 5:12mentors gives testy persistent
  169. 5:14extremists
  170. 5:15zealous youthfulness kindness means
  171. 5:19giving
  172. 5:20teaching permeating excess zeal
  173. 5:23yourself i feel i feel like connected to
  174. 5:26that one myself
  175. 5:27killing messengers don't kill the
  176. 5:29messenger right killing messages give it
  177. 5:30gives terrible people
  178. 5:32exactly zero yo you have to do the hand
  179. 5:34yo either the hand
  180. 5:35i know the help this is the yohan i'm up
  181. 5:37i'm giving some gang sign out there
  182. 5:39um kindergarten means giving teachers
  183. 5:42perfect examples of zeal in youth i love
  184. 5:45that
  185. 5:48kissing mediocre giraffes teaches people
  186. 5:50to expect zero from you
  187. 5:52kinky mean girls teach people exciting
  188. 5:56zen yoga kissing mel gibson
  189. 5:59teddy pendergrass exclaimed zesty yo
  190. 6:03that's what i remember actually when i'm
  191. 6:05thinking is it z y i'll actually say
  192. 6:07that one i'll say
  193. 6:08i'm revealing a little bit of my head
  194. 6:10here i actually say that one when i try
  195. 6:12to remember it if i
  196. 6:13said easy is it easy y-e-y-z i use that
  197. 6:15one if i get stuck
  198. 6:16and here's my favorite one and it's not
  199. 6:18the one i use but it's my favorite one
  200. 6:19kissing me gives 10
  201. 6:21extra zeal in youth so tell that to your
  202. 6:23friends tell their friends
  203. 6:24not talking about kissing dan but
  204. 6:25kissing yourself you know hey
  205. 6:27ralph what sue kissing me gives 10 extra
  206. 6:30zeal in youth
  207. 6:31okay anyway whatever you decide to use
  208. 6:34pick one of these
  209. 6:35pick make your own up but remember this
  210. 6:37sequence
  211. 6:38this year where all of our uh all of our
  212. 6:40exams are going to be open book but in
  213. 6:42the future
  214. 6:42we might go back to closed book and we'd
  215. 6:44like to be able to have you memorize
  216. 6:46this so this is a good thing
  217. 6:47now this important one if i tell you 2
  218. 6:51to the 34
  219. 6:52how many bits would be needed to address
  220. 6:552 to the 4 2 to the 34 different things
  221. 6:57you remember that
  222. 6:57you know two to the some number how many
  223. 7:00how many bits is this to encode n things
  224. 7:03it's two to the
  225. 7:04n things to and i can go
  226. 7:07i'll start again
  227. 7:11what is two to the 34 how many bits to
  228. 7:13address that uh how many bits to address
  229. 7:152.5
  230. 7:16tebby b uh heavy bites of something
  231. 7:19so these are two questions that you
  232. 7:20might um want to be able to answer
  233. 7:23quickly
  234. 7:23and in fact i encourage you as a 61c
  235. 7:26soon-to-be graduate
  236. 7:27to be able to be fluent in this space so
  237. 7:30the way i think of it
  238. 7:31is i want you to memorize these two
  239. 7:33tables in fact i'm going to actually
  240. 7:35have a little have a little sound here
  241. 7:37to say please do think about memorizing
  242. 7:39these tables and the way to do this
  243. 7:40the way to to know how to do this is the
  244. 7:43following
  245. 7:442 to the xy x is the tens column and y
  246. 7:46is kind of the ones column
  247. 7:49i start with the ones column and it's
  248. 7:51really easy to memorize this one let me
  249. 7:53just grab
  250. 7:53so you want to be memorizing this this
  251. 7:55sequence right here okay
  252. 7:57so zero one two four eight
  253. 8:01sixteen thirty two we're up five now six
  254. 8:03sixty four i'm not even looking i'm
  255. 8:04closing my
  256. 8:0564 128 256 is eight that's another
  257. 8:09important one because eight bits used to
  258. 8:11control
  259. 8:12256 different color channels for a
  260. 8:14standard old-school
  261. 8:15monitor including the ppms you worked
  262. 8:17with um if you did
  263. 8:18uh 61c this semester when you had a
  264. 8:21assignment that had ppms
  265. 8:239 512 and then 10 well 10 is the next
  266. 8:26one okay so
  267. 8:27that's all you gotta remember so those
  268. 8:28nine and then you go back to the
  269. 8:31kibi member gibby tabby pebby eggs be
  270. 8:33zebby yabby and you have that sequence
  271. 8:35and that is the x that's the tens column
  272. 8:38so you hit very quickly ready
  273. 8:3934. in my brain i'm saying 4
  274. 8:42is 16. okay see look i've been looking 4
  275. 8:45is 16
  276. 8:46okay 30s well the 30s is gibby so i'd
  277. 8:49say 16 gibby
  278. 8:51did i get it right i did okay that's
  279. 8:53pretty cool
  280. 8:55so let's do another one uh i almost feel
  281. 8:57like i have a random thing here we go
  282. 8:5947 128 tabby
  283. 9:02pretty cool 64. man i got a 64-bit
  284. 9:06address space
  285. 9:07how many bytes of memory can i access
  286. 9:0964.
  287. 9:1116xb wow that's pretty cool
  288. 9:14so continue to think about that and now
  289. 9:15the reverse of that is the following
  290. 9:17if i say i want to be able to address
  291. 9:192.5 tebby bytes
  292. 9:21well how many is that well what you do
  293. 9:22is you take 2.5 and you take the ceiling
  294. 9:25of that what's the next biggest power of
  295. 9:262 above that 2.5 is bigger than 2 so
  296. 9:28it'd be 4.
  297. 9:29so i'd say 4 that'd be 2. okay so i'm
  298. 9:32going to say
  299. 9:32something 2. tebby is 4. so i'd say 42
  300. 9:36i think you need 42 bits to address 2.5
  301. 9:39tabby bytes
  302. 9:40because 42 bits is 4 tepe and 4 w is the
  303. 9:43next big power of 2
  304. 9:44above 2.5 tube bytes okay so
  305. 9:47we often call this the iec numbers but
  306. 9:49here binary prefixes is the right name
  307. 9:51so from now on this is the beginning
  308. 9:53lecture on caches
  309. 9:54and this lecture really could have gone
  310. 9:56in fact maybe
  311. 9:58mookifying these lectures into small
  312. 9:59pieces could have really gone the first
  313. 10:01lecture because it would be fun to have
  314. 10:03this
  315. 10:03kind of be fluent about this from the
  316. 10:05beginning of the semester but you don't
  317. 10:06really need it until caches
  318. 10:08and so this is in the cache lecture but
  319. 10:09i hope in the future this lecture is in
  320. 10:10the front and
  321. 10:11feel free to ignore this a little bit
  322. 10:12about it if it actually is in the front
  323. 10:14why we should move it because it already
  324. 10:15moved
  325. 10:15if we happen to do that okay you
  326. 10:17understand that but it's fine all right
  327. 10:19we'll see the next lecture and we'll
  328. 10:20learn more about caches thanks

About this transcript

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