YouTube2Text

[CS61C FA20] Lecture 17.1 - Combinational Logic Blocks: Data Multiplexors — Transcript

by CS 61C Departmental · 2,401 words · 373 segments · language en · Watch on YouTube

Full transcript

  1. 0:00and welcome back in this last series of
  2. 0:03lectures we're going to talk about
  3. 0:04combinational logic blocks again this is
  4. 0:06all the umbrella of
  5. 0:07synchronous digital systems combination
  6. 0:09logical blocks say
  7. 0:10let's see if we can build larger blocks
  8. 0:13out of combinational logic elements that
  9. 0:15are powerful
  10. 0:16and really useful for our data path so
  11. 0:18we're going to start with
  12. 0:19data multiplexers and what they mean
  13. 0:22data multiplexer is very much like a
  14. 0:24flag person
  15. 0:25whose job it is to take n lanes of you
  16. 0:28draw this here
  17. 0:29n lanes of uh of highway from from this
  18. 0:33area of
  19. 0:33the 101 and maybe n lanes of highway
  20. 0:36from
  21. 0:37the five i have to do southern
  22. 0:39california vernacular and there's only
  23. 0:41one bridge
  24. 0:42and all of 101 and root five have to
  25. 0:44take one bridge
  26. 0:45and this signal line is going to tell
  27. 0:48you
  28. 0:48which of those drives when the signal
  29. 0:50line is zero then
  30. 0:51a drives the bridge when this thing line
  31. 0:54is one then
  32. 0:55b drives the bridge and c is either one
  33. 0:56or zero never both okay so that's the
  34. 0:58idea of a mux
  35. 1:01so way we can think about it that was an
  36. 1:04n-bit input much so the n-channel input
  37. 1:06box with one different
  38. 1:07one signal line you can think of this as
  39. 1:09being n
  40. 1:10instances of a one bit wide much so
  41. 1:12let's actually talk about it one bit
  42. 1:13wide mux and how to build that and then
  43. 1:15maybe you can learn how to build
  44. 1:16the larger one i showed you in the
  45. 1:17previous slide of the end bit wide mucks
  46. 1:20so how many rows in this truth table
  47. 1:21okay pause for a second and see if you
  48. 1:23can figure out the answer and i'll tell
  49. 1:24you in
  50. 1:24two seconds all right welcome back
  51. 1:28number of rows how many inputs do i have
  52. 1:30i'm counting one
  53. 1:32two three that's three inputs three bits
  54. 1:35is eight rows okay there's my a rows
  55. 1:39which basically says the following it
  56. 1:41says well let's look at this well i've
  57. 1:42got
  58. 1:43when s is zero s is zero what is c
  59. 1:47let's look at c is essentially whatever
  60. 1:49a
  61. 1:50is look at that that's exactly the same
  62. 1:51as the output when s is one
  63. 1:54c is whatever b is really useful right
  64. 1:56so
  65. 1:57see how this is the same thing okay so
  66. 1:59that's pretty cool so that's a way to
  67. 2:01think about this but
  68. 2:02let's say we don't see that that's that
  69. 2:03way let's try to borrow this down to the
  70. 2:05simplest logic that'll actually make
  71. 2:07this work
  72. 2:07we're going to try to eventually try to
  73. 2:08make the simplest formal logic fewest
  74. 2:10gates to
  75. 2:11implement our one bit wide marks okay
  76. 2:13well
  77. 2:14canonical form says summer products okay
  78. 2:17so let's do this
  79. 2:18every row that's review every road
  80. 2:21that's a one
  81. 2:22we say what term is it that's a one when
  82. 2:25it's not
  83. 2:26s and a and not b there's that first
  84. 2:29term and you do this for all four terms
  85. 2:31to give you four terms then you put your
  86. 2:33get your dip your hands into your
  87. 2:34boolean massage
  88. 2:35lotion and start working that equation
  89. 2:38work that equation
  90. 2:39all right here we go well i can already
  91. 2:42pull the s
  92. 2:42out here here's the sorry the not s pull
  93. 2:45that guy out
  94. 2:46maybe i'll use my pen to do that for me
  95. 2:48so that
  96. 2:49here what what's the law that allows me
  97. 2:51to go from here
  98. 2:53this term to that term distribution i
  99. 2:56call reversed it because you're kind of
  100. 2:57reverse distributing out there but it's
  101. 2:58a lot of distribution okay
  102. 3:00same thing here okay same idea here
  103. 3:04and how about this how about this inner
  104. 3:05term how do you go from there to there
  105. 3:07the same thing i'm just just reverse
  106. 3:10distributing out
  107. 3:11a and b out of that term well how about
  108. 3:14this one what's this one remember this
  109. 3:17what's this b or not b yeah the law of
  110. 3:20complementarity
  111. 3:21okay so that tells me that that's one
  112. 3:23now how about what how do you go from
  113. 3:24here
  114. 3:26to here that's the identity property
  115. 3:28that because you remember
  116. 3:29hopefully you remember that from from
  117. 3:30algebra yielding
  118. 3:32is really simple not s a or
  119. 3:36s and b now let's think about that not s
  120. 3:39then you're a or when s is high
  121. 3:43it's b it's almost like you're learning
  122. 3:45from it's almost like you could go
  123. 3:47straight from here
  124. 3:49to this it's what's what's the output c
  125. 3:52well if not s mean s is 0 meaning not s
  126. 3:55then it's a or when s is one
  127. 3:59it's b so actually you almost don't need
  128. 4:02any of this stuff
  129. 4:03you could go straight from here to here
  130. 4:05and in fact
  131. 4:07as we go to the next one you're kind of
  132. 4:08you i was kind of talking my way through
  133. 4:10this already
  134. 4:10you could almost go straight from here
  135. 4:12really to this one which is when s is
  136. 4:14zero it's a
  137. 4:15s wanted to b to here to there so
  138. 4:17actually there is a shortcut really this
  139. 4:18way
  140. 4:19to that way to think about that okay so
  141. 4:22s is zero it's a s is one it's b and
  142. 4:25that's the same thing
  143. 4:26think about that take if you don't see
  144. 4:27that one-to-one connection between these
  145. 4:29two things take some time to think about
  146. 4:30that before you move on
  147. 4:31kind of neat right that's kind of cool
  148. 4:34all right
  149. 4:35so how do we build one bit wide box none
  150. 4:38of this is new this is all review
  151. 4:40not sna or s and b there it is piece of
  152. 4:43cake
  153. 4:43pretty simple not s and a or s
  154. 4:47and b seen that before nothing really
  155. 4:48special there
  156. 4:50okay now let's throw a little curve ball
  157. 4:53put a spit on this ball and throw a
  158. 4:55curveball down all right
  159. 4:57how about a four to one mux huh how do
  160. 5:00you do four wheel box let's think about
  161. 5:01this well
  162. 5:02now my signal line has two bits because
  163. 5:05i've got to choose from among four
  164. 5:06inputs
  165. 5:06i didn't tell you this is a four by one
  166. 5:08four to one one bit
  167. 5:10mucks each of these guys are one bit
  168. 5:12wide
  169. 5:13well what do i have well look at this
  170. 5:14i've indicated here and do this yourself
  171. 5:17indicate if you ever write a mux what
  172. 5:19the value of the signal is for each of
  173. 5:21these guys you notice i didn't the last
  174. 5:22one as well i wrote a zero and one there
  175. 5:23same thing here so it's unambiguous
  176. 5:25who wins or s is one one it's gonna be d
  177. 5:28so as i
  178. 5:29as s has the numbers values zero through
  179. 5:30three you know who's gonna win
  180. 5:32and here's a little table here you know
  181. 5:34e the output is gonna be
  182. 5:36a b c or d depending on whether s has a
  183. 5:37value zero one two or three respectively
  184. 5:40okay so that's nothing special how do
  185. 5:42you build this one
  186. 5:44first of all let's ask ourselves how
  187. 5:45many rows of the truth table pause
  188. 5:50thought about it right okay well i count
  189. 5:53six input lines
  190. 5:54i count four guys there total
  191. 5:57and two here that's six lines two to the
  192. 6:00six is
  193. 6:0164. okay so i count 64. boy really
  194. 6:05i got a truth table that's 64 long
  195. 6:09and it's like six inputs over there and
  196. 6:11then one i mean really
  197. 6:13that's a lot of numbers 64 times seven
  198. 6:15numbers it's like six input lines i want
  199. 6:17to output at seven
  200. 6:18for everyone 764 i don't want to do that
  201. 6:20sorry
  202. 6:21i ain't doing it is there another way to
  203. 6:25do it
  204. 6:26by the way here is here okay by the way
  205. 6:28i'll just give you a
  206. 6:29freebie i could do that or i could go
  207. 6:31straight to
  208. 6:32the answer what's the answer you saw
  209. 6:35that before before it was
  210. 6:37not s and a or s and b can you go
  211. 6:40straight to the answer here
  212. 6:42yes and bam check this out
  213. 6:47this is saying e the output is
  214. 6:51not s and not
  215. 6:54not s1 and not s 0 and a
  216. 6:57or not s 1 and s 0
  217. 7:01and b etc isn't that cool
  218. 7:04so kind of the aha we got from the last
  219. 7:06slide yields us
  220. 7:08lets us save our time rather than having
  221. 7:10to make any truth table and had to do
  222. 7:12any bullying algebra massaging put that
  223. 7:14boolean algebra lotion way
  224. 7:15i'm ready to go straight from the idea
  225. 7:17of a mux to its
  226. 7:19equivalent not necessarily canonical
  227. 7:21form but pretty tight form
  228. 7:23uh to describe a four to one one output
  229. 7:25mux
  230. 7:26that's pretty cool okay so think about
  231. 7:28ways you can do shortcuts rather than
  232. 7:29having to go well i know how to do truth
  233. 7:30tables because i got to slog through
  234. 7:32that one
  235. 7:32it's like any game i just got to grind
  236. 7:34through to get those points stop
  237. 7:35grinding just go straight to the output
  238. 7:37if you can't there's a shortcut
  239. 7:38jump right here ikea is great they have
  240. 7:40this special path where you can go
  241. 7:42straight to the register rather than
  242. 7:43have to wind your valve away
  243. 7:44do the ikea you know trip do the kind of
  244. 7:46optimization like that
  245. 7:48and if you wanted to see this here's the
  246. 7:50equivalent look at this here's about
  247. 7:52basically look at this this is the
  248. 7:53connection straight from here to that so
  249. 7:55i can go here i can go from here to that
  250. 7:58or i can go here to this
  251. 7:59there i can go straight from here to
  252. 8:00there because i know how to do this now
  253. 8:02i'm fluent now enough with this so
  254. 8:03think about how to go straight to the
  255. 8:05answer it's pretty cool
  256. 8:07now how do i wire this up though
  257. 8:11i could as i said i could either think
  258. 8:12about that way to wire it up i could
  259. 8:14think about
  260. 8:14you know making the the the product of
  261. 8:17the sum of those four terms
  262. 8:19or is there a way to think about another
  263. 8:21way to think about
  264. 8:23how i mean when i have i don't know
  265. 8:24let's say four basketball teams and i
  266. 8:26have one national championship
  267. 8:28how do i do that how do i get those four
  268. 8:30basketball teams
  269. 8:32you know to have a final winner do i do
  270. 8:34this were the mucks and a table
  271. 8:36no they play against each other you have
  272. 8:38these two teams play and there's a
  273. 8:39winner from the western region
  274. 8:41and these two play and then there's a
  275. 8:42winner from the eastern region they play
  276. 8:43in the championship game right
  277. 8:45hopefully cal comes up the winner on top
  278. 8:48so
  279. 8:49hierarchically that's the aha the aha is
  280. 8:52this recursive or hierarchical way you
  281. 8:54could wire them can you see it can you
  282. 8:56already see it
  283. 8:58isn't that cool so you can think of
  284. 9:01s0 and s1 as wiring together
  285. 9:04three two three of these
  286. 9:08two to one muxes and there's my four to
  287. 9:11one mux this whole by the way
  288. 9:12if i draw a box out here look folks
  289. 9:15that's my four to one mux
  290. 9:17but inside of it are three two to one
  291. 9:19muxes isn't that cool i think this is
  292. 9:21really neat so then we're going to see
  293. 9:22this there's a lot of ahas here
  294. 9:24and the heart here is you can make use
  295. 9:25of other blocks rather than going well
  296. 9:27got to make 64 rows
  297. 9:29and do some algebra to build you could
  298. 9:30do that or you could just wire this
  299. 9:32together and
  300. 9:33obviate the need for touching a truth
  301. 9:34table at all no truth table just wire
  302. 9:36like this
  303. 9:37what's great about this if you play with
  304. 9:39this is you've got
  305. 9:41here's my s0 s1 watch when s
  306. 9:45these guys are s 0 is 0 0 who's going to
  307. 9:47win that's right
  308. 9:48should be a well s0 says well that's
  309. 9:51going to come through a
  310. 9:52is going to be on that line and this one
  311. 9:54says c is on that line
  312. 9:57and s1 determines who wins of that
  313. 10:00tournament
  314. 10:01well if that's zero then a gets to win
  315. 10:03so when it's zero
  316. 10:04zero it's a etc let's just see how about
  317. 10:07one minute let's just do a one one test
  318. 10:09say one one one one so that means d wins
  319. 10:12so d is here and b wins that's a
  320. 10:14different whole different tournament
  321. 10:15hold it from final
  322. 10:16final final game and then s1 is one so
  323. 10:19d comes through so when it's one one
  324. 10:22it's d
  325. 10:23isn't that neat so this is a powerful
  326. 10:25idea that says
  327. 10:27one we don't have to go through the
  328. 10:29pedantic slogging through grinding our
  329. 10:31way through to make a 64
  330. 10:33row truth table i can say wait you know
  331. 10:35i could actually build this
  332. 10:37build this block out of smaller blocks i
  333. 10:39know about and as you get
  334. 10:41more and more fluent in digital logic
  335. 10:43and combinational circuits and
  336. 10:44and boolean algebra you can realize you
  337. 10:46don't have to always go back to
  338. 10:48the back to the beginning to build your
  339. 10:50truth tables and do i mean that was
  340. 10:51crazy that's crazy so
  341. 10:53we like the idea of being smart about
  342. 10:55things sometimes
  343. 10:56and and cascading things in this way
  344. 10:58which is really really nice turns out
  345. 11:00that i mean
  346. 11:00when a is going to be chosen there's
  347. 11:02still work done over here but it's
  348. 11:03hardware these things are always moving
  349. 11:05always doing it they just don't don't
  350. 11:06get chosen you know it's like the uh
  351. 11:08the person who doesn't get chosen to to
  352. 11:10to win i mean that's
  353. 11:12a is going to come through this is zero
  354. 11:13and that's a zero a is going to go in
  355. 11:15i don't even care they're doing work but
  356. 11:17they never get c they never see the
  357. 11:18light of day
  358. 11:19it's almost like the you know the
  359. 11:21whoever doesn't win the presidency did
  360. 11:23all that work and didn't matter anyway
  361. 11:24you weren't chosen same idea right a lot
  362. 11:26of people
  363. 11:27put work into it and then at the end of
  364. 11:29the day
  365. 11:30nobody won by the way vote i don't care
  366. 11:33what year this is what year this video
  367. 11:35gets played make sure you vote make sure
  368. 11:36you put in your
  369. 11:37uh you apply your democratic rights
  370. 11:41um please make use of that and vote have
  371. 11:43your representation known
  372. 11:44very important all right we'll see the
  373. 11:45next lecture

About this transcript

This page contains the full transcript of [CS61C FA20] Lecture 17.1 - Combinational Logic Blocks: Data Multiplexors by CS 61C Departmental, generated from the public captions YouTube serves with the video. The transcript has 2,401 words across 373 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.