That unbelievable function that can compute EVERYTHING! An Adventure in Discrete Mathematics

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 มิ.ย. 2024
  • Well, this is a video all about 0's and 1's. Rather a lot of them really.
    It's about universal operations and exploring how very simple sets of operations can be used to theoretically compute anything at all.
    Addendum: I mention in the video that the NAND gates required for a video game or operating system would be comparable to Graham's Number. I am wrong, the number of NAND's required is faaaaaarrrrr less than that monster!! Thanks for the correction all :)
    All images from Wikipedia.
    NAND is all you need merch available from Creel Spring store:
    whats-a-creel-3.creator-sprin...
    Support What's a Creel? on Patreon:
    / whatsacreel
    FaceBook:
    / whatsacreel
    Background images from animations from HDRI Haven: hdrihaven.com/
    Software used to make this vid: Visual Studio 2019 Community: www.visualstudio.com/downloads/
    (Came in mighty handy for spitting out truth tables, let me tell ya!)
    Blender: www.blender.org/
    Audacity: www.audacityteam.org/
    Davinci Resolve 16: www.blackmagicdesign.com/prod...
    Gimp: www.gimp.org/

ความคิดเห็น • 374

  • @zactron1997
    @zactron1997 2 ปีที่แล้ว +244

    Excellent video! I read a book ages ago called "But how do it know?" which covered not just this, but how to make memory cells, RAM, registers, everything. Basically a full NAND to Tetris style book. This was a really good summary of the same fundamental concepts, excellent work!

    • @WhatsACreel
      @WhatsACreel  2 ปีที่แล้ว +20

      Thanks mate!! Sounds like a great read, if I ever come across that book I'll defo pick it up! Thanks for watching :)

    • @ulysses_grant
      @ulysses_grant 2 ปีที่แล้ว +8

      This book is a hidden gem! I go back to it once in a while, simply amazing material.

    • @phasm42
      @phasm42 2 ปีที่แล้ว +7

      I bought this book for my son and nieces/nephews, and I have extra copies on stand-by 😅

    • @RupertReynolds1962
      @RupertReynolds1962 2 ปีที่แล้ว +9

      Book ordered. Thanks for the pointer :-)

    • @ulysses_grant
      @ulysses_grant 2 ปีที่แล้ว +6

      @@RupertReynolds1962 Great! If you like the subject you'll definitely love the book!

  • @Cracked1ce
    @Cracked1ce 2 ปีที่แล้ว +84

    This is the concept behind a Single Instruction Set Computer using NAND. Another great addition would be to show how NAND can be used to create a latch which is used for memory, flip flops, pipelining, etc.

    • @WhatsACreel
      @WhatsACreel  2 ปีที่แล้ว +7

      Oh that is a good addition!! Cheers for watching :)

    • @flatfingertuning727
      @flatfingertuning727 2 ปีที่แล้ว +3

      Attempting to construct a computer exclusively from gates identical whose inputs are indistinguishable from each other will yield a problem: if all gates have a propagation time of exactly N, all positive feedback loops will have a propagation time that's a multiple of 2N, making it impossible to build a synchronizer. If one can control propagation times to avoid such issues, or impose setup/hold requirements on all inputs and outputs including things like buttons, building a computer out of NANDs wouldn't be the most practical approach, but it would hardly be impossible. The number of two-input NAND gates required to form an N-bit RAM, for example, would be O(N)--not even O(NlgN)--if one is willing to accept an O(lgN) access time, and some practical machines like the Apollo Guidance Computer were built almost entirely out of a single kind of gate (NOR gates in the case of the AGC) except for things like the memory system which could have been built out of NAND cates, but were more efficiently constructed using magnetic cores.

    • @mocringe811
      @mocringe811 2 ปีที่แล้ว +1

      Can you link somewhere for me to look into this?

    • @flatfingertuning727
      @flatfingertuning727 2 ปีที่แล้ว +1

      @@mocringe811 It's possible to build a one-bit RAM "RAM" using four NAND gates, if the data input is available in both true and complemented formats. Given two N-bit RAMs, it's possible to produce a 2N bit RAM by adding about eight NAND gates. As RAMs get bigger, the average cost per bit will increase, but never exceed twelve NAND gates (1.5 times 8) per bit.

    • @mocringe811
      @mocringe811 2 ปีที่แล้ว +1

      I've played around a bit with these logic gates, making these registers, ALUs and such, I thought Daniel was referring to the NAND function itself creating memory, thanks anyway

  • @heaslyben
    @heaslyben 2 ปีที่แล้ว +24

    Oh nice, I like how you used a variety of games to motivate the concept of completeness! It gives a solid intuition because games are obviously logic-based and computable, but also an unlimited, creative, imaginative space.

  • @programaths
    @programaths 2 ปีที่แล้ว +49

    First year of curriculum: rewrite the expression only using NAND gates. The game starts when you golf it!

    • @proloycodes
      @proloycodes 2 ปีที่แล้ว

      it can also be done using only XOR gates!

    • @programaths
      @programaths 2 ปีที่แล้ว +6

      @@proloycodes a xor a 0
      So, xor need a constant. Eg: not a 1 xor a.
      Nand work without constants, only non inverted inputs.
      So, nand does it better ^^

    • @proloycodes
      @proloycodes 2 ปีที่แล้ว +1

      @@programaths hmm can you show me a not gate without using constants, emulated using NAND?

    • @programaths
      @programaths 2 ปีที่แล้ว +6

      @@proloycodes a nand a not a

    • @proloycodes
      @proloycodes 2 ปีที่แล้ว +3

      @@programaths great! you've converted me into NAND-ism!
      All Hail the Great NAND!
      lol

  • @Jackarooo
    @Jackarooo 2 ปีที่แล้ว +21

    There's a great programming class online called Nand 2 Tetris where you start off with making all of the boolean operators with nand gates and then build an ALU and CPU with that and write assembly and eventually build an OS. But the key idea there is that everything is just layers of abstraction on top of a bunch of logical gates (which could technically be all nand gates)

    • @mikefochtman7164
      @mikefochtman7164 11 หลายเดือนก่อน +1

      Ages ago in school, I remember working out how to make a complete two-bit adder, using nothing but NAND gates. You can't do this with 'OR' only gates, or 'AND' only. But 'NAND' gates can be used to create NOT, AND, and OR so you're able to create just about anything.

  • @danielvest9602
    @danielvest9602 2 ปีที่แล้ว +31

    I remember college learning these truth tables in 3 different classes - assembly programming, philosophy &logic, and statistical logic.

    • @robertjames4908
      @robertjames4908 2 ปีที่แล้ว +3

      The third truth table in statistical logic would that be common-sense statistics or government statistics? Experience shows the two do share the same truth tables.🤣🤣=😭

    • @danielvest9602
      @danielvest9602 2 ปีที่แล้ว +4

      @@robertjames4908 Definitely common sense. Government logic makes my head explode 🤣

  • @deltakid0
    @deltakid0 2 ปีที่แล้ว +16

    Your channel is like several years ahead from me to understand it, I've found really interesting videos here that are like 5 or 9 years old (such as self-modifying code and x86 Asm).
    It's just too much information for a regular C# programmer like I am, but I always wanted low level things that I'm just starting to understand.
    Anyway, thank you very much for this because no one in the entire planet talks about, and that is very valuable for me.

  • @JimTheScientist
    @JimTheScientist 2 ปีที่แล้ว +28

    I kept saying “and gate” out loud over and over until you said Boolean and, it made me feel so accomplished to know it before it was said.

    • @daniel.lupton
      @daniel.lupton 2 ปีที่แล้ว +1

      Isn't the NAND gate the "universal" gate though. I can't imagine how you'd create a NOT operation with just AND gates.

    • @jgained5065
      @jgained5065 2 ปีที่แล้ว

      @@daniel.lupton as far as I understand it, you just have one line coming in with constant power that goes straight to the output. Then you have a transistor coming off that line that goes to ground. When the transistor is off, the power goes past it into the output making a “1”. If it’s powered on, all the flow goes through the transistor and into ground making the output “0”.

    • @jgained5065
      @jgained5065 2 ปีที่แล้ว +1

      Diagram:
      /---output
      |
      +-T--ground
      | |
      | \-input
      p
      w
      r

    • @daniel.lupton
      @daniel.lupton 2 ปีที่แล้ว

      @@jgained5065 Yes, but a transistor isn't an AND gate. You can make all the gates from just NAND gates. NOT is just the input going to both inputs. An OR is just a NAND with both inputs negated (with the NOT, so 3 NANDS). AND is obviously a NOT on the NAND output. Etc
      You can make anything with NAND. I think you can do the same with NOR and XOR. But AND has no way to negate with just gates.
      Also zeroing your signal to ground sounds like a really expensive way to make a NOT gate. You're basically shorting that signal. That means anything else reading that signal will also read 0. And it probably back propagates through all the transistors. I'm not an electrical engineer but it sounds inefficient.

    • @JimTheScientist
      @JimTheScientist 2 ปีที่แล้ว

      @@daniel.lupton I’m not really sure what you interpreted my comment to mean but I was talking about the beginning of the video, where Boolean and is introduced.

  • @Intermernet
    @Intermernet 2 ปีที่แล้ว +23

    Touching ending mate. I'd also like to thank Alan. Bloody legend.

    • @tfritzon
      @tfritzon 2 ปีที่แล้ว +3

      Indeed! Thanks Alan!

  • @JodyBruchon
    @JodyBruchon 2 ปีที่แล้ว +7

    There is an interesting concept called a OISC: One Instruction Set Computer. It's a processor that only does one operation while still being a general-purpose computer. An example of a single operation that could be used for this computer is SUBLEQ: subtract and branch if result less than or equal to. There's an excellent article on TechTinkering that illustrates this one.

  • @sagoot
    @sagoot 2 ปีที่แล้ว +5

    I recommend the game Turing Complete to play around with this.
    In the game you start with a nand gate and gradually build a computer from it, and then you programm your computer.
    I had a lot of fun with it.

    • @kingacrisius
      @kingacrisius 10 หลายเดือนก่อน

      I've never heard of that one but I have played a browser game called NAND Game

  • @Tsynique
    @Tsynique 10 หลายเดือนก่อน

    Alan Turing is the reason we are all here... on the internet.. on TH-cam.. in front of our phones/computers/tables/etc... Cheers, mate!

  • @ulysses_grant
    @ulysses_grant 2 ปีที่แล้ว +2

    I just luv the way you can make such dull subjects (just like boolean algebra can get in a discrete maths book) become so exciting to talk about, not to mention the unique sense of humor you have in discussing such things. You have the gift of teaching. Great stuff, just awesome!

  • @hugo5097
    @hugo5097 2 ปีที่แล้ว +6

    Really good video, really like the way you present everything with the animations. Keep it up!

  • @michaelduffy7469
    @michaelduffy7469 2 ปีที่แล้ว +19

    Is this made in blender? I really love the graphics, helps me understand the concept a lot more. Great video!

  • @camofelix
    @camofelix 2 ปีที่แล้ว +14

    Hey mate! Heads up, for the Phenom benchmark, I added AVX-512 options to both flops and SHR as a pull request

    • @WhatsACreel
      @WhatsACreel  2 ปีที่แล้ว +4

      Oh that's cool! I'm not very good at keeping up with the git hub. Is there soemthing I need to do there?
      I did want to get back into it. Possibly upload a much larger project, 64 bits per channel raw photo editor, not sure when I'll get round to it tho.

    • @camofelix
      @camofelix 2 ปีที่แล้ว +5

      @@WhatsACreel You'd need to accept is as a merge! user name is the same.
      in terms of implementation, it verifies for the feature using cpuinfo and pigibacks off of the mechanism/style you used in the base functions for ease of readability.
      Flops is very close to your own implementation, but larger registers.
      the SHR uses some tricks of moving across AVX port 0/1 and port5 for the xmm,ymm and zmm registers to save on instruction latency.
      You can comment on the request before merging

  • @koohii3301
    @koohii3301 2 ปีที่แล้ว +1

    Brilliant video, thanks Creel for your effort. Some time ago I also watched and studied your entire (newer) playlist of assembly, I like the way you explain topics!

  • @MarcinKwiatkowski
    @MarcinKwiatkowski 2 ปีที่แล้ว +1

    Excellent video! I'm experienced computer scientist, and this explanation is just perfect, especially final conclusion that all computations can be done with one kind of logic gate, which is obvious for some of us, but sometimes hard to explain. Your conduct of explanation is just perfect.

  • @bart2019
    @bart2019 2 ปีที่แล้ว

    There was nothing in this video that I didn't know before, but it's a nice refresher. A very nice refresher.

  • @makkusaiko
    @makkusaiko 2 ปีที่แล้ว +1

    This is a very good way of explaining logic to some who might not know a lot about computing

  • @quintrankid8045
    @quintrankid8045 2 ปีที่แล้ว +52

    "can compute EVERYTHING!" that is computeable. Turing proved that not everything is computeable.

    • @theguythatcoment
      @theguythatcoment ปีที่แล้ว +5

      and turing machines have never been created because no one has found a way to make infinite ram. In all seriousness if you find a new uncomputable function you might win yourself a spot in wikipedia. alongside Rice.
      Most things are computable unless you're trying a way to fuck with the machine's memory instructions.

    • @quintrankid8045
      @quintrankid8045 ปีที่แล้ว +4

      @@theguythatcoment It's true that no one can create a Turing machine, but we still speak of programming languages as being Turing Complete, even if they don't have infinite ram.
      An new incomputable function? How about a function that can prove that a program will write the number 5? Or 6? Or 7?

    • @lyrimetacurl0
      @lyrimetacurl0 ปีที่แล้ว +1

      But everything is able to be generated. For example most real numbers are uncomputeable but if you generate a random string of digits then you are generating an uncomputeable number.

    • @quintrankid8045
      @quintrankid8045 ปีที่แล้ว

      @@lyrimetacurl0 Why is that uncomputeable? For example, 3.27 = 3 + .2 + .007.

    • @joseberger7737
      @joseberger7737 11 หลายเดือนก่อน

      @@quintrankid8045ry listing every number between 0 and 1, there are infinite and with most your computer is gonna run out of ram for that number only

  • @Tsynique
    @Tsynique 10 หลายเดือนก่อน

    I don't have words to describe how much I love boolean algebra.. and this presentation makes me feel very much at home.. Thanks Creel ;)

  • @pythonixed4448
    @pythonixed4448 2 ปีที่แล้ว +2

    Thanks mate, amazing breakdown. “NAND is all you need”

  • @phyniffer
    @phyniffer 2 ปีที่แล้ว +1

    Wonderful and informative video as always, thank you for taking your time to do this.

  • @mr.bulldops7692
    @mr.bulldops7692 2 ปีที่แล้ว

    The AR presentation is absolutely sick!

  • @MrMycelium
    @MrMycelium 2 ปีที่แล้ว

    Great video, I love the energy and the teaching style!
    Keep up the great work!

  • @TerjeMathisen
    @TerjeMathisen 2 ปีที่แล้ว +1

    I was watching for the first 17 minutes, all the time expecting you to show that the NOR (or NAND) gate is all you need, and then just a few seconds later you actually got there. :-)

  • @JerryThings
    @JerryThings 2 ปีที่แล้ว

    I'm always happy to see your video pop up into my feed :))

  • @Zman2024
    @Zman2024 2 ปีที่แล้ว

    Nice to see another video creel, Keep up the good work!

  • @tejonBiker
    @tejonBiker 2 ปีที่แล้ว

    This reminds me the digital electronic class and fpga class at university, good memories, thanks for the video

  • @xyzct
    @xyzct 2 ปีที่แล้ว

    Magnificent presentation. Thank you, sir!

  • @pedrodesanti6266
    @pedrodesanti6266 2 ปีที่แล้ว

    i love when i found videos that i know that i will return for years, good job

  • @saiputcha1730
    @saiputcha1730 5 หลายเดือนก่อน +1

    Boole based his algebra on the ancient Indian system of logic, Nyaya. In fact, Boole's binary logic is a special case of Nyaya's ternary, quaternary... N-ary logic

  • @mullergyula4174
    @mullergyula4174 2 ปีที่แล้ว +1

    Really liked the ending.

  • @rubixtheslime
    @rubixtheslime 2 ปีที่แล้ว +1

    This isn't a criticism, more of a continuation. While the fact that computers can be conducted entirely out of NAND gates is impressive, my favorite minimal Turing complete system would have to be the SK calculus. It's based on lambda calculus, which played a crucial role in showing the usefulness of Turing machines. But SK calculus breaks it down even further into simply two combinators (aka functions):
    K, the constant function constructor: K x y -> x
    S, the branch constructor: S x y z -> (x z) (y z)
    That's it. That's Turing complete. The fact that this is the case is one of the most beautiful things in computer science. For example, you can make recursion without self referencing:
    Y f -> f (Y f), where Y = S (K (S (SKK) (SKK)) (S (S S (S K (SKK))) (S (SKK) (SKK))
    Of course lambda and SK calculi are not really able to be implemented directly in hardware the same way NAND is able to, but computers were not originally a physical concept. In a way, NAND is the face of minimal turing completeness on the hardware side, while SK is the face of minimal turing completeness on the software side.

  • @realcygnus
    @realcygnus 2 ปีที่แล้ว

    Superb ! Brings me way back to 1st learning digital.

  • @samuraiflack3880
    @samuraiflack3880 2 ปีที่แล้ว +1

    wait... you're that aussie guy who makes great videos. i didn't know you were back!

  • @furyzenblade3558
    @furyzenblade3558 2 ปีที่แล้ว

    Missed your videos, they're great!

  • @saeedbarari2207
    @saeedbarari2207 2 ปีที่แล้ว

    The video taught me more than the past two years of CS at university

  • @Bobbias
    @Bobbias 2 ปีที่แล้ว +1

    Now of only someone could explain abstract algebra/group theory with this level of clarity :)

    • @WhatsACreel
      @WhatsACreel  2 ปีที่แล้ว +1

      That's a fine idea!! I do love Socratica, if you've not seen their videos on the topic, they're definitely worth a watch!
      I would love to make videos on that. Not sure when tho.
      Thank you for watching, have a good one :)

    • @Bobbias
      @Bobbias 2 ปีที่แล้ว

      @@WhatsACreel oh, I have not heard of them. I'll definitely have to check them out. I've been self learning that stuff after Haskell's heavy usage of abstract algebra concepts introduced me to it. The problem is that the main resources I've been using are Wikipedia and nLab... And my formal math education ended around pre-calc, so I often end up in a black hole on those sites.

  • @phovos7618
    @phovos7618 2 ปีที่แล้ว

    Cheers, mate. Rockin' viddy. I can feel my brain much more than usual rn.

  • @mikesbasement6954
    @mikesbasement6954 2 ปีที่แล้ว +1

    Great video! Was starting to expect to see Karnaugh maps :D

  • @tomysshadow
    @tomysshadow 2 ปีที่แล้ว

    It's weird to see operations that I have come to intuitively learn how they work, broken down in great mathematical detail like this, and describing behaviours I know to be true from hands on experience but had never seen explained this way. Interesting video

  • @capitalist88
    @capitalist88 ปีที่แล้ว

    Beautiful explanation. I'm familiar with logic gates and boolean algebra, but never knew that NAND and NOR are universal in this way. Just a fantastic job on this.

  • @stumbling
    @stumbling 2 ปีที่แล้ว +3

    Minecraft redstone uses universal NOR gates.

  • @RetiredInThailand
    @RetiredInThailand 2 ปีที่แล้ว

    I'm old enough to have worked on 'computer controlled equipment' in the 70s. elevators on Naval supply ships to be specific, and at that time the 'computer' to control these elevators was a big hard wired circuit board using discrete transistors ... to save on the number of different logic gates, which were created with individual relatively high powered transistors and 'modular' to be easily replaced when one failed, all the gates were NAND gates ... all logic circuits can be created using combinations of NAND gates.

  • @DouglasZwick
    @DouglasZwick 2 ปีที่แล้ว +3

    Excellent video! Great presentation and production, good sense of humor and all that. And, as has been mentioned elsewhere in the comments, a truly touching ending. Alan Turing was a phenomenal genius and we all owe him a debt of gratitude.

  • @krumpy8259
    @krumpy8259 2 ปีที่แล้ว

    Incredible video, thank you!

  • @MDNQ-ud1ty
    @MDNQ-ud1ty 11 หลายเดือนก่อน

    In fact, all one needs is a nand gate to compute all logic. ALL computation including that in your brain can be done with a simple nand operation(of course in immensely complex expressions).

  • @_abdul
    @_abdul 2 ปีที่แล้ว

    Mr. Creel, Thanks Mate, You're Amazing.

  • @hell0kitje
    @hell0kitje 2 ปีที่แล้ว +1

    You animation skills are so good as programming!

  • @rustycherkas8229
    @rustycherkas8229 2 ปีที่แล้ว

    Nice! Takes me back to classroom days when, with paper & pencil, we used '•' for AND, '+' for OR and bars over top for NOT... Fun to swap things around like: NOT(a) • NOT(b) == "a NOR b"...
    Figuring out XOR was something special...

  • @jeremypnet
    @jeremypnet 2 ปีที่แล้ว +4

    4:14 Babbage wasn’t using “valves and tubes”. The Difference Engine was purely mechanical. The Analytical Engine would have been too.

    • @HowardCShawIII
      @HowardCShawIII ปีที่แล้ว

      Had to pause and come see if someone made this comment. Spot on! However, while the Difference Engine was made of gears and rods, not valves and tubes (vacuum tubes came in 1904), there is still some potential validity, as he could possibly be referring to steam valves and copper tubes. Given that had the DE actually been completed and put into operation it would likely have been operated by steam, as indicated by his purported quote: "I wish to God these calculations had been executed by steam." Check out this steam-driven 4-column difference engine: th-cam.com/video/t8aYkow-Fv8/w-d-xo.html
      Still, the engine itself was gears on rods, with carry arms - purely mechanical, as you say.

  • @stancostin
    @stancostin 2 ปีที่แล้ว +2

    Great video! You made me love again computer programming :D

    • @WhatsACreel
      @WhatsACreel  2 ปีที่แล้ว

      Oh, that's great, cheers for watching! :)

  • @darske1
    @darske1 2 ปีที่แล้ว +1

    This brings me back a lot of memories makking circuits withh just nand gates. It saved space since a single chip comes with 4 or more nand gates, while doing "and, or, and not" would require at least 3 chips. The nor gate is universal too :P

  • @hinzster
    @hinzster 2 ปีที่แล้ว

    And this is the reason that the very first of the 74-series of TTL chips, the 7400, is exactly that. Four NAND-gates on a chip. Genius!

  • @redsmith9953
    @redsmith9953 ปีที่แล้ว

    Interesting, make me remember about the Karnaugh map's which not only compress but also you can solve any complex combination of logic gates arrays using only one type of gate AND, nice to see another of your interesting videos!

  • @tomascrhonek
    @tomascrhonek 2 ปีที่แล้ว +4

    Great video! Glad to have you back. How long did it take you to model this in Blender?

    • @WhatsACreel
      @WhatsACreel  2 ปีที่แล้ว +6

      Cheers mate! I didn't time it, 100+ hours all up for this vid. That includes all the modelling, rendering, editing and sound and that. It's slow going that 3D. Defo fun, but veeeerrryyyy slow.
      I will probs take a break from straight 3D for while and do some more coding. So I can get some more vids out in a reasonable time frame.
      Anywho, cheers for watching, have a good one :)

    • @BryndanMeyerholtTheRealDeal
      @BryndanMeyerholtTheRealDeal ปีที่แล้ว +1

      The .notdef's at 3'54?

  • @JIRKA_Praha
    @JIRKA_Praha 2 ปีที่แล้ว

    Amazing video! Thx for it

  • @eljashyyrynen4787
    @eljashyyrynen4787 2 ปีที่แล้ว +1

    Wow what a channel :) you got a new sub!

  • @cparsec5524
    @cparsec5524 2 ปีที่แล้ว +2

    Creel is the Steve Irwin of Computer Science

  • @alan2here
    @alan2here 2 ปีที่แล้ว +2

    fantastic episode :) ⭐️⭐️⭐️⭐️⭐️
    I'm getting the impression theres "dice info-anim renderer pro" or something out there somwhere. I've seen this exact animation style before.

    • @WhatsACreel
      @WhatsACreel  2 ปีที่แล้ว +2

      Ha! Yes, it's Blender 3D :)

  • @abhinavraj8479
    @abhinavraj8479 2 ปีที่แล้ว +3

    Great video!! Loved the content. Extremely curious about the prime gate you mentioned @13:53, is it just a odd detector or does it work with binary primes?

    • @proloycodes
      @proloycodes 2 ปีที่แล้ว +2

      it only works with numbers upto 7, or if you allow wrapping, it outputs 1 for every 8k + p, where p is prime.

    • @mohammadazad8350
      @mohammadazad8350 2 ปีที่แล้ว +1

      @@proloycodes I knew this was absurd or wouldn't work for all numbers

  • @jamesabber7891
    @jamesabber7891 2 ปีที่แล้ว

    Great video explaining boolean algebra.
    I began studying boolean algebra in grade 7. This, and some other mathematics topics I was looking into at that time, drove my math teacher insane. She had gotten used to me returning the math exercise book we were given at the beginning of each school year the day after I received it with all questions solved since 4th grade. But now I was above her grade, and she could no longer answer my questions. Boolean algebra got me interested in computer science, so I studied computer science and math at university.
    But since you mentioned that this can compute everything, please make a follow-up video showing how it can compute the halting problem :)

  • @marsvandeplaneet7786
    @marsvandeplaneet7786 2 ปีที่แล้ว

    Nice video. At school, we also learned to use Karnaugh diagrams.

  • @cmuller1441
    @cmuller1441 2 ปีที่แล้ว +7

    He presented a dichotomic way to produce the formula for any function. But there's a simpler method: just list all the cases that produce a "1" output and OR these.
    Example: a 3 input function that is always 0 except for 000 and 011 inputs. The function is f=(~a * ~b * ~c) + (~a * b * c)
    (* is AND, + is OR, ~ is NOT)

    • @WhatsACreel
      @WhatsACreel  2 ปีที่แล้ว +3

      Oh, I like that :)
      I remember doing something similar with AND, you just like (A&~B&C) and then OR together any of the 1's in the table.
      Cheers for sharing mate!

    • @cmuller1441
      @cmuller1441 2 ปีที่แล้ว +1

      @@WhatsACreel The method is to find the 1 and then ORing subfunctions that are zero everywhere except for that particular input. That produce a sequence like ( *... ) + ( *... ) + ( *... )...
      But we can do the opposite by finding the 0 outputs and then ANDing subfunctions that are 1 everywhere except for that particular input and get ( +... ) * ( +...)...
      en.m.wikipedia.org/wiki/Canonical_normal_form

    • @WhatsACreel
      @WhatsACreel  2 ปีที่แล้ว +1

      @@cmuller1441 You know, I was thinking of normal form too!! BSAT and 3SAT!! Wow, what a puzzle, I looooovve them :)

    • @DFPercush
      @DFPercush 2 ปีที่แล้ว +4

      A sum of products is the way most combinational circuits like this are implemented, because it settles in constant time. Look up Karnaugh map if you want to see how to optimize it. ;)
      Of course there are programs that will do this for you. Logisim is one I know of, although the interface for inputting a truth table can be kind of painful.

  • @JulianStokesIt
    @JulianStokesIt 9 หลายเดือนก่อน

    That all stuff was thought about before we had whizzy silicon things just blows my mind. I wonder if Boole had half an inkling as to the true possibilities his ideas would unleash?

  • @przemekkobel4874
    @przemekkobel4874 11 หลายเดือนก่อน

    Yes, you can build entire computer out of NAND gates (and few others too). Congratulations, you have just saved 22 minutes of your life.

  • @bettercalldelta
    @bettercalldelta 2 ปีที่แล้ว +1

    The god is actually just NAND.

  • @ghir0
    @ghir0 2 ปีที่แล้ว +4

    Great video! Makes me go back in time when I went through the "From NAND to Tetris" Coursera content.

  • @tremon3688
    @tremon3688 9 หลายเดือนก่อน

    Great video!

  • @williamgraham2468
    @williamgraham2468 2 ปีที่แล้ว

    The term I learned was "complete base", rather than "universal".
    My book recommendations:
    1) The Turing Omnibus, A.K. Dewdney.
    2) Bebop to the Boolean Boogie, Clive Maxfield.

  • @harumiohana906
    @harumiohana906 2 ปีที่แล้ว +1

    Thanks mate!

  • @the_allucinator
    @the_allucinator 2 ปีที่แล้ว

    It gets more interesting when you discover what a Universal Construction is. (Category Theory)

  • @ihatethesensors
    @ihatethesensors 2 ปีที่แล้ว

    I like the cubes - they're cool looking.

  • @phasm42
    @phasm42 2 ปีที่แล้ว

    You can read the output column as a number and use that number to uniquely identify a function by number. E.g. if the bottom row is MSB, AND is function 8, TRUE is 15, OR is 14, etc.

  • @BK-md2qw
    @BK-md2qw 2 ปีที่แล้ว

    Thanks mate, you too are amazing.

  • @leyasep5919
    @leyasep5919 2 ปีที่แล้ว

    The multiplexer is an even more admirable universal gate !

  • @piotrlenarczyk5803
    @piotrlenarczyk5803 2 ปีที่แล้ว +1

    Thank you for video.

    • @WhatsACreel
      @WhatsACreel  2 ปีที่แล้ว +1

      You are welcome :)

  • @K9Megahertz
    @K9Megahertz 2 ปีที่แล้ว +6

    Good stuff! Just curious, what did you animate this in?

    • @WhatsACreel
      @WhatsACreel  2 ปีที่แล้ว +3

      Cheers mate! It's Blender 3D. Great program!! :)

    • @K9Megahertz
      @K9Megahertz 2 ปีที่แล้ว +1

      @@WhatsACreel Awesome! Though that it might be. Appreciate the confirmation!

  • @PplsChampion
    @PplsChampion 2 ปีที่แล้ว +1

    all you need is nand ❤

  • @jarikosonen4079
    @jarikosonen4079 2 ปีที่แล้ว

    Yes. Its needed in building electronic machines or also in programming.
    In electronic design it is needed to know how its made of transistors - and some cases it can be hard challenge.

  • @az-kalaak6215
    @az-kalaak6215 2 ปีที่แล้ว +11

    wow this is insane
    I was wondering though, does this mean we are still using only 3 instructions machine, or did the firm making them implemented "shortcuts", like implementing a xor, a nor, a nand...
    Or do they still use the 3 instructions even to create their shortcuts?
    I am pleased to see another video of you, I was starting to think you were gone from youtube!

    • @WhatsACreel
      @WhatsACreel  2 ปีที่แล้ว +13

      I think hardware manufacturers use a lot of different logic gates together to make a CPU. You can get a thing called like a NAND gate array or something. They certainly rely heavily on the magic of NAND! But most hardware will be implemented using a bunch of different logic gates.
      Defo didn't leave TH-cam :) I'm just rather slow.... It is nice to see you all again anywho, and thanks for watching :)

    • @Tumbolisu
      @Tumbolisu 2 ปีที่แล้ว +5

      Modern machines are made using either only the NAND or only the NOR gate. Just one of these two can simulate all boolean operations, and therefore is enough to build a whole computer with. The main reason for doing this is to make mass production easier.

    • @DFPercush
      @DFPercush 2 ปีที่แล้ว +6

      I'm not an engineer at Intel or anything, but looking at some old 286 scans, I think they use a mix of various gates, mainly because every gate has a delay. If you had to use 3 NAND gates to make an OR, it would be 2 or 3 times slower. They'll use "wire gates" which are simpler than the versions you can buy on standalone chips, and the difference is that the standalone gates can sink or source current, in other words, a 0 will actually pull down any other voltage to a logic low, and give a place for the current to go. Wire gates don't do that, they're just simple traces with transistors either in series for AND, or parallel for OR, that can open or close the circuit to allow the voltage to get through. You can get away with that when you control everything else about the circuit around it. Using a mix of gates doesn't really hurt mass production, it all goes into the photo mask.
      Now if you're talking about programmable logic, like FPGAs, those are probably NAND only, because they have to adapt to whatever is needed. And for prototyping, it's a lot easier to keep a bin full of NAND chips rather than 7 separate gate types that you'll run out of, so it's useful to know how to convert between various logic ops. There might be a stage of CPU design where things are tested on NAND only logic, but in the final production you want as few delays as possible.

    • @Tumbolisu
      @Tumbolisu 2 ปีที่แล้ว +3

      @@DFPercush I was told that NAND/NOR gates are also prefered because the NOT-ing of the signal at every step will give it little boosts, making it less likely for the energy to dissipate into resistance heat.

    • @DFPercush
      @DFPercush 2 ปีที่แล้ว +3

      ​@@Tumbolisu That's a new one on me. I'll have to think about that. (Warning, long stream of conciousness ahead) I guess if you have long wires and high clock speeds, the parasitic capacitance could cause issues, but boosting the voltage along the same length of wire is only going to increase power dissipation, so I'm not sure how that's supposed to help. Unless the wire is long and thin enough to drop the voltage below a logic low. But I can't imagine that happening in the tiny span of a silicon die. What does makes sense though, is if you have a signal that's normally high, that you need to transmit over long distances, it might be better to invert it at both ends so the wire is low most of the time. That would help in TTL logic (bipolar junction transistors), but CMOS transistors / mosfets don't really pass that much current, all they have to do is statically charge the gate. And usually those gates would be close together anyway. It's really the capacitance of the lines that produces most of the heat, and if things are constantly switching on and off really fast, inverting it doesn't really save you anything. In a steady state, they're basically an open circuit, whether it's a 1 or a 0. I dunno, doesn't make sense to me, but I'm curious if there's something I'm missing.

  • @louf7178
    @louf7178 2 ปีที่แล้ว

    I have this on my computer. It's called the "excellent" key. Whatever you want, just press it, and it comes out excellent. Credit: S. Horvath.

  • @cccapuno
    @cccapuno 2 ปีที่แล้ว +1

    shout out to xor, crazy ass fella

  • @SebastianHasch
    @SebastianHasch 2 ปีที่แล้ว +1

    Nice video, really wish I had seen this in my computer science class😂

  • @grahamking9121
    @grahamking9121 2 ปีที่แล้ว +1

    Fun video, lively and clear presentation! But - did I hear correctly?! - Charles Babbage did not use 'valves & tubes & all kinds of craziness': his Difference Engine was purely mechanical, with gears & levers.
    And let's never forget the pioneering work of Ada Lovelace!!

  • @anon_y_mousse
    @anon_y_mousse 2 ปีที่แล้ว +1

    Excellent CGI. I'm assuming you used Blender? Makes me want to play with esoteric languages again, BF being my favorite. Though I will admit to laughing harder than I should have at Moo.

  • @kcaz64
    @kcaz64 2 ปีที่แล้ว

    Patreon is the platform. Patrons are supporters.

  • @ruffianeo3418
    @ruffianeo3418 ปีที่แล้ว

    Once you arrive at Alan Turing, I think also Alonzo Church deserves a shout-out for the equally powerful Lambda Calculus. But hopefully, you will do that in a future video.

  • @SimGunther
    @SimGunther 2 ปีที่แล้ว

    One NAND to rule them all!

  • @TheCptEd
    @TheCptEd 2 ปีที่แล้ว +1

    Good Day Creel!

  • @doudoud82
    @doudoud82 2 ปีที่แล้ว +1

    Before you transited to Allen Turing you remind me of lambda calculus in general where it can do everything also with the S K logic.
    PS: turning machines and lambda calculus are equivalent XD quite the relationship there.

  • @markmanning2921
    @markmanning2921 2 ปีที่แล้ว

    there are ways of explaining simple things that make them almost impossible to understand. but there are also ways of explaining complex things in ways that make them trivial to understand.

  • @nates9778
    @nates9778 2 ปีที่แล้ว +1

    He's Back!

    • @WhatsACreel
      @WhatsACreel  2 ปีที่แล้ว +3

      Ha! Sorry I'm sooo slow. Well, good to see yall anywho :)

  • @idontwantahandlethough
    @idontwantahandlethough 2 ปีที่แล้ว +2

    Oh man... this reminds me of when I took a logic class in college. The professor was brilliant but had a _super thick_ Indian accent. So in a class about zero's and one's, I had a professor who could pronounce neither 'zero' or 'one'. On top of that, we had randomly assigned "lab" partners... and mine was a Korean dude who spoke almost literally zero English (cool dude though! We pretty much just smoked weird foreign cigarettes and communicated through gestures and math lol). That semester was an absolute nightmare.
    I think I got a B, but that was by far the hardest class I've ever taken. Makes much more sense the second time around, honestly. Great video btw, I'm subscribing :)

  • @brightblackhole2442
    @brightblackhole2442 2 ปีที่แล้ว

    15:00 you could also use a karnaugh map so you don't have to deal with that huge equation

  • @TheFakeVIP
    @TheFakeVIP 2 ปีที่แล้ว

    Electrickery is my new favourite word!

  • @ghostlucian12
    @ghostlucian12 2 ปีที่แล้ว

    it is much simple to use karnaugh maps, to simplify the truth table into simple mathematical operations especially when the number of bits are increased..
    Another way is to simplify the truth table, select the rows where outputs are 1 and add them for example XOR gate:
    A B O
    0 0 0
    0 1 1
    1 0 1
    1 1 0
    So what we notice is A = 0 and B = 1 outputs 1 or A = 1 and B = 0 outputs 1, we can translate the function above into:
    O = A'B+AB', this can be also noted O = (~A)&B | A&(~B)
    If the output function is too big, it can be simplified using simple math, example OR Gate.
    A B O
    0 0 0
    0 1 1
    1 0 1
    1 1 1
    O = A'B+AB'+AB = A(B+B') + A'B = A + A'B =A+B
    A+A' = 1
    A+A'B = A+B
    A' = ~A
    AB = A&B
    A+B = A|B

  • @phasm42
    @phasm42 2 ปีที่แล้ว

    I used that (A&f(x)) | (~A&f(x)) trick to do conditional subtraction in a long division circuit I was emulating recently 😅