Redstone Binary Subtraction - LRR #5

  Рет қаралды 113,041

mattbatwings

mattbatwings

Күн бұрын

Пікірлер: 243
@CraftyMasterman
@CraftyMasterman Жыл бұрын
lrr is such a force of nature, not even SICKNESS could stop HIM!!!
@darqed
@darqed Жыл бұрын
he actually just made a redstone machine that recorded and deepfaked this video
@ikhfarakmaltuvfx
@ikhfarakmaltuvfx Жыл бұрын
@@darqed can you shut up?!!? And ALSO THAT IS WRONG
@teamruddy611
@teamruddy611 Жыл бұрын
Um...Redstone machines can't replicate audio yet - try again when redstone computers are fully implemented.
@hoteny
@hoteny Жыл бұрын
yeah? OMW to grabbing rabbies (I will be a famous person and get money for acting as if I treated him)
@RADEET.OFFICIAL
@RADEET.OFFICIAL Жыл бұрын
I can stop him
@ok-y-pull-up
@ok-y-pull-up Жыл бұрын
Matt explains the most complex thing so well is not normal
@cmtg461
@cmtg461 Жыл бұрын
Your dad
@cursordgod2935
@cursordgod2935 Жыл бұрын
​@@cmtg461 🤔?
@rodrigoqteixeira
@rodrigoqteixeira Жыл бұрын
GUYS WE FINALLY KNOW WHY INVERTING AND ADDING 1 WORKS!!! I'M SO HAPPY :)
@darqed
@darqed Жыл бұрын
Watch some Sebastian league and his how computers work series
@GospodKrompir
@GospodKrompir Жыл бұрын
yeah that was my first introduction to binary systems and boolean algebra@@darqed
@IceMetalPunk
@IceMetalPunk Жыл бұрын
As a developer with a computer science degree, I of course knew about two's compliment; but I never stopped to wonder *why* the conversion algorithm of "invert + 1" works. When you showed the algebraic connection to modular arithmetic, my mind was blown. Thank you for the education! 🙂
@Gandhi_Physique
@Gandhi_Physique Жыл бұрын
I never thought about it, but as soon as he said people would wonder, I automatically assumed that N bits go up to a value of 2^N-1. Inverting means +1.
@lewismassie
@lewismassie Жыл бұрын
12:40 You can also see how thinking about the last bit has a negative value shows the inversion by the series of numbers counting up from negative 8.
@arthur1112132
@arthur1112132 Жыл бұрын
I always liked this way of seeing two's complement because it's the one that makes the more sense to me. Since a single bit's value is exactly the sum of all previous bits + 1, making it negative forces the final value to fall in negative space (-1 being the smallest absolute value). This also automatically invert the order in which the absolute value increments/decrements which then creates the emergence of all the other advantages listed in the video :)
@billydrink
@billydrink Жыл бұрын
I don't even like minecraft. I'm a computer scientist and these videos are a really entertaining way of relearning what I already know in a new environment. Great work!
@alibrahym
@alibrahym Жыл бұрын
how to pay taxes?
@samuelhulme8347
@samuelhulme8347 Жыл бұрын
@@alibrahym it depends on your government. Please contact an appropriate agency of your government.
@alibrahym
@alibrahym Жыл бұрын
@@samuelhulme8347 How to date women?
@samuelhulme8347
@samuelhulme8347 Жыл бұрын
@@alibrahym please ask someone else. I do not know.
@alibrahym
@alibrahym Жыл бұрын
@@samuelhulme8347 what is the true religion?
@Str4ky
@Str4ky Жыл бұрын
I learn more in 1 min 30s with this video than in 5 years of school with professors
@higgs7473
@higgs7473 Жыл бұрын
CS student here; great videos. It was by sheer chance I happened to watch one of these before my first class on low level computing, and now I always hear my professor talking about the things you do here. Really well done.
@bluelego4180
@bluelego4180 Жыл бұрын
Au-delà de l'aspect Minecraft, c'est même super bien expliqué sur l'aspect de l'informatique bien joué à toi et bisous de France
@Dimitri_gdr
@Dimitri_gdr Жыл бұрын
J'avoue il est trop fort
@Dimitri_gdr
@Dimitri_gdr Жыл бұрын
Le fait qu'il l'explique sur minecraft ça donne un aspect plus convivial aussi
@Dimitri_gdr
@Dimitri_gdr Жыл бұрын
@@pomelo9518 no I didn't know him What is the link between the fact that I'm french and him?
@bluelego4180
@bluelego4180 Жыл бұрын
@@pomelo9518 of course
@bluelego4180
@bluelego4180 Жыл бұрын
@@Dimitri_gdr il est français, même si son contenu est en anglais
@UnPandaOrange
@UnPandaOrange Жыл бұрын
Great revision of my comp sci classes with a Minecraft aspect on top, love it!
@samuelbudzinak
@samuelbudzinak Жыл бұрын
Love that veritasium music when explaining using clock
@electronpie
@electronpie Жыл бұрын
And 3blue1brown's math animation library at that as well!
@unfunnyfailure
@unfunnyfailure 2 ай бұрын
I wanted to comment that
@nickdraddy101
@nickdraddy101 5 ай бұрын
I've been putting off learning redstone since i was a kid, this series is the only time it's ever made sense lmao. I got a better understanding of binary from this series than any of my classes in college.
@eliasthememelord
@eliasthememelord Жыл бұрын
This video actually made me understand Why two’s complement exists and why it works! Thank you from a current computer science major
@soundest8768
@soundest8768 Жыл бұрын
This is the best explanation of 2’s Complement I’ve heard so far! Thank you!
@treesmaofficial3873
@treesmaofficial3873 11 ай бұрын
this is the first time I'm actually enjoying math class thank you for these videos
@Rexus2
@Rexus2 10 ай бұрын
This series is incredible! Recently decided I wanted to learn redstone in its entirely, and although this focuses more on redstone logic instead of the whackier items like pistons, skulk, and observers. I really feel like this is foundational knowledge that I'll be able to take advantage of in future projects and learnings. Absolutely amazing work, my man, thank you.
@Zwaydi
@Zwaydi Жыл бұрын
Your actually making computer science even more fun and understanding. Thanks A LOT
@vieuxslave9077
@vieuxslave9077 3 ай бұрын
Learnt about Two’s complement in GCSE, they never explained why it worked or anything, love this video for that, I finally understand where it comes from! Thank you!
@neondead2.0.15
@neondead2.0.15 Жыл бұрын
It's hard for me to process this, but it's good. Love that you show how it works on practice so it was A LOT easier to understand. Hope to see more of this.
@capsey_
@capsey_ Жыл бұрын
It's kinda weird to me that you learned two's complement using modular arithmetic before learning the negating most significant bit trick. I learned it other way around and, honestly, your way is probably better, because knowing math behind why it works is better than just blindly use the trick.
@koyarnosredstone5783
@koyarnosredstone5783 Жыл бұрын
It's not really taught that way, true. I advocated for the modular arithmetic theory as its an easier model to imagine.
@toblobs
@toblobs Жыл бұрын
Great vid as always, keep up the work Matt
@SunroseStudios
@SunroseStudios Жыл бұрын
we already knew about two's compliment, but hearing that it's based on modular arithmetic made us truly understand it for the first time!!
@ArbitraryCodeExecution
@ArbitraryCodeExecution Жыл бұрын
oh I didnt know the trick to interpret two's complement numbers, that's great!
@pengilton
@pengilton Жыл бұрын
I would really love it if you would do one video for multiplication and one for division. I know that you already covered those two but it would perfectly fit into your new series of tutorials. I really love this series! I am a CS student and I have been following redstone stuff for ages now, so I do find it easy to follow the technical stuff but I am not good with compact designs hence I appreciate this channel so much! Maybe I should try build a redstone computer again when I got time. Thank you and keep going with your amazing work! :D
@DarmiGames
@DarmiGames Жыл бұрын
This was much easier to understand, than I thought
@iaminfinityiq7182
@iaminfinityiq7182 5 ай бұрын
I'm trying to create subtractor circuits in a logic gates IDE from 2 bits to 4 bits. You really are helping me out! Since this IDE does not support constant input (0, 1), I have to try and simplify as best as I can 😅. Thank you for helping me out, I really appreciate it.
@tonerrr4295
@tonerrr4295 Жыл бұрын
You are actually the best. These are so well explained, and amazingly made. Learning these concepts on fun and easy, keep it up!
@nice3294
@nice3294 Жыл бұрын
I love the way you introduced two's complement
@ben256dev
@ben256dev Жыл бұрын
I don't even know if this stuff is in my CS curriculum. I'm super grateful for these videos!
@giacomomosele2221
@giacomomosele2221 Жыл бұрын
The 3blue1brown music really made this feel so professional😂 Keep up the great work, you really are one of the best logical redstoners in the world
@G973_
@G973_ Жыл бұрын
Ive been waiting for this one. Ive been trying to make a calculator on bedrock then noticed your binary episode, knew youd cover subtraction eventually
@3xic317
@3xic317 Жыл бұрын
i'm glad you explained twos complement. i always thought of negative numbers in binary as the last place being negative. i.e: 4 bits would be -8,4,2,1
@Jmcgee1125
@Jmcgee1125 Жыл бұрын
I remember first learning this in a computer architecture class. The things you can do with 2's complement... it's awesome. Also, abusing that overflow to do a comparison is nice - literally just need to check one bit (though equality still requires more). Also props for not calling -7 + -7 = 2 an underflow. Still overflow 👍
@boomsandapples2640
@boomsandapples2640 Жыл бұрын
These videos are great, I am learning so much! Thank you for this awesome series!
@HugTheLlama
@HugTheLlama 4 ай бұрын
This video was magical❤😂🎉 Edtit: 10:49 omfg I love that
@swotiix3993
@swotiix3993 3 ай бұрын
You explained the two's complement better than my teacher in one year...
@couldntcareless7884
@couldntcareless7884 11 ай бұрын
a good way to think about two's complement is to consider the last bit to represent the negative of what it does for the regular binary. For example, with four bits 1011 would be -8 + 2 + 1 which is -5, and inverting and adding 1 gives 0101 which is 4 + 1 = 5. Edit: Oh, it's already in the video
@Merione
@Merione Жыл бұрын
Edit: Nevermind, I kept watching the video and I realized I wrote a stupid comment haha! I'm keeping it here for the engagement though! Great video!
@Cas-Se78.97
@Cas-Se78.97 Жыл бұрын
8:55 Also, if you are more focused on the results than the math behind it, you can think of the +1 as avoiding having -0 and thus having to increment twice to get past 0 (-1 -> -0 -> +0 -> +1). It's not an actual proof, but I think it can be helpful to remember. (Edit: this also causes problems in 1's complement)
@firstbytebr
@firstbytebr Жыл бұрын
wow, that's a lot simpler than I tought :)
@OscarBassett-om5un
@OscarBassett-om5un 4 ай бұрын
Im a very novice redstoner and love following your awesome videos! I was wondering, at 2:07, couldn't you overcome the issue if you put the sign value (1 for negative and 0 for positive) at the end
@definitlyarealperson7041
@definitlyarealperson7041 Жыл бұрын
Finally another LRR episode!
@fadilamiruddin1198
@fadilamiruddin1198 Жыл бұрын
I’m using this video to study for my ece midterm
@asherperttula
@asherperttula 11 ай бұрын
this is also a good series it helped me alot
@dinoeebastian
@dinoeebastian 11 ай бұрын
So my dad builds parts for rockets, and he couldn't comprehend why you add one when negating a binary number, I thought that was hilarious
@zxccxz3795
@zxccxz3795 Жыл бұрын
👏👏👏 Я сделал механизм который может как складывать так и вычитать два отрицательных числа. Чтобы тебе сделать такой нужно: 1)к механизму сложения добавить еще один; 2)добавить инверсию к входу сигнала с двух сторон (у тебя в видео с одной стороны); 3)соединить инверсии с сумматором с помощью логического элемента "или"; 4)соединить инверсии логическим элементом "и"; 5)соединить этот логический элемент с вторым сумматором ко второй платформе. Если что-то не понятно спроси меня об этом.
@zxccxz3795
@zxccxz3795 Жыл бұрын
Если хочешь могу скинуть на почту, но только укажи на какую.
@gddotop2231
@gddotop2231 5 ай бұрын
Ля, а просто xorы подключить нельзя?
@WesleyNatashaThompson
@WesleyNatashaThompson 8 ай бұрын
Best videos on KZbin
@ImranAli-wt1er
@ImranAli-wt1er Жыл бұрын
Oh finally he has recovered!❤
@higuy3482
@higuy3482 Жыл бұрын
i learned more here than i did during math in school
@smamy8861
@smamy8861 Жыл бұрын
probably because they'd cover this in computer science and not math lol
@Abdulkadir-yq2vm
@Abdulkadir-yq2vm Жыл бұрын
Finally a New awesome episode
@bangfebri01
@bangfebri01 Жыл бұрын
Very good explanation and detail awesome matt, sorry I can't join patreon first because I don't have dollar bills introduce me from Indonesia 😊
@koyarnosredstone5783
@koyarnosredstone5783 Жыл бұрын
finally a 2s comp explanation i can live with xd
@nootaboot7042
@nootaboot7042 Жыл бұрын
gonna get back to building computers in minecraft thanks to this, thank you
@wdude9997
@wdude9997 Жыл бұрын
11:53 Nice pun
@DaBlueFin1
@DaBlueFin1 23 күн бұрын
11:28 for some reason with all of my CCA adders and I can't do 7 on the right side and 2 on the left side, it just gives me 1.
@andrewporter1868
@andrewporter1868 Жыл бұрын
Additionally, it's worth pointing out some terminology here for values to make things clearer: in 13 \equiv 1 (mod 12), 1 is called the residue. The residue is the value that is the result of computing the remainder of a congruence, in this case the congruence 13 \equiv 1 (mod 12), per Wolfram MathWorld (amazing "encyclopedia"; go check it out!). Also don't worry about what \equiv here is. It's the name for the congruence symbol in LaTeX which lets you render mathematical notation so that it's neat and readable the same way we can text with a keyboard.
@gamingwithapex6081
@gamingwithapex6081 11 ай бұрын
when making the toggleable adder/subtractor an easier way to do it is just have the toggle lever run power into the side of all the redstone torches making them toggle the inversion.
@7028.m
@7028.m Ай бұрын
Am I the only one who doesn't understand how the inverted numbers are supposed to then pass BSD and get to the display? And I have to build extra cells for the display decoder? Sorry, I'm stupid.
@a_craftermc
@a_craftermc 5 ай бұрын
When I was connecting the subtracter to my adder to would always not want to make the first two ones to a zero it took me around 30 minutes to figure out that I had the comparator was not in subtract mode for the first light. It was so annoying lol
@samuelbudzinak
@samuelbudzinak Жыл бұрын
I remember making my first calculator in minecraft and copying circuit for comparison of A and B (If A>B, then result is +, if A=B then 0, and if A
@vstechiegamer5996lol
@vstechiegamer5996lol Жыл бұрын
What you built at 11:07 was a 1 bit 4-bit ALU
@ohseungkwon3009
@ohseungkwon3009 4 ай бұрын
There is sign bit and bits for the number, and if both of sign bits are 1, which represent nagative, dont invert the numbers and normaly add and nagate the output.
@hiaaf6105
@hiaaf6105 3 ай бұрын
9:43 it's cool to think also that in 4 bits the leftest bit is equivalent to -8 instead of 8 so 1011 = 1 * (-8) + 0 * 4 + 1 * 2 + 1 * 1 = -5 ok lol you talk about this later in the video
@RikuTheMultimaker
@RikuTheMultimaker 11 күн бұрын
i gotta love it how i try to do the same thing as he describes and not getting it
@RikuTheMultimaker
@RikuTheMultimaker 11 күн бұрын
nvm i put glass instead of wool in one place
@gabrielbelisle8634
@gabrielbelisle8634 Жыл бұрын
Love this video 🙌🏻🙌🏻🙌🏻
@LordDecapo
@LordDecapo Жыл бұрын
*goes to make popcorn to watch with*
@Meowsciles
@Meowsciles Жыл бұрын
A good way to invert it is have a switch that you can turn on and off to do 1(invert) 0(normal) and connect it to an xor gate and if I have the switch on 1 and the input as 1 it will output 0 and if I input zero as the input then it will become 1 Here’s the truth table Input | Output 0 0| 0 1 0| 1 0 1| 1 1 1| 0 As you can see this is the exact truth table of an xor gate
@devtigr6949
@devtigr6949 Жыл бұрын
Hello matt where can i find your texturepack? think it looks really good.
@Remson-11
@Remson-11 11 ай бұрын
I was powering thru untili hit this video.... This is the third day i' m stuck on this video. This was just a hard concept to comprehend, for now i know enough to move on i feel.
@BinaryCoderBiCo
@BinaryCoderBiCo 10 ай бұрын
The Veritasium music in the explanation at 4:31 lol
@AxlePlaysGames
@AxlePlaysGames Жыл бұрын
God I love negative binary numbers GCSE Computer Science taken a year early with little prior knowledge was hell when I got to Two’s complement
@nplsm
@nplsm Жыл бұрын
Now I don't know if this could be useful or even relevant but I might have found something quite helpful for these subtractors or something equivalent to that, lemme explain rq. In your introduction at 0:19, I immediately noticed a pattern in the substraction form where : 1-0=0 / 0-1=1 / 0-0=0 / 1-1=0 Didn't get the time to test all of that myself but can't logic gates try to calculate and process that and maybe directly output the result? I'd be interested to hear more on that thing, maybe I'm just very wrong LOL
@IceMetalPunk
@IceMetalPunk Жыл бұрын
He did mention you can implement the standard subtraction algorithm in circuitry. But if you already have an adder, it's more efficient to reuse that for subtraction instead of creating a separate circuit to do it.
@danielgeerds6382
@danielgeerds6382 5 ай бұрын
6:11 where did the 29 come from?
@whtiequillBj
@whtiequillBj Жыл бұрын
have you looked into the recent Posit: A Potential Replacement for IEEE 754?
@Tomekurens
@Tomekurens 5 ай бұрын
Is it possible to make a binary counter but instead of adding you substract?
@4deemi
@4deemi Жыл бұрын
dude, hearing the veritassium music made me feel like i was learning faster.
@dark_elf_wizard
@dark_elf_wizard Жыл бұрын
this is very interesting.
@fireisplays
@fireisplays Жыл бұрын
i love you matbat
@skypowergb3842
@skypowergb3842 Жыл бұрын
how did you made such compact adder mine is like giant just for 1 bit is like half of yours and this is just adder with carry and 2 inputs (even using pistons for few gates
@FelanLP
@FelanLP Жыл бұрын
Positive zero and negative zero matters if you work with decimal points. But if it is just zero, it's the same.
@sarchlalaith8836
@sarchlalaith8836 Жыл бұрын
To change the adder to a subtractor would a stack of redstone torches on pistons not also work?
@saynator
@saynator Жыл бұрын
You can‘t move Redstone torches with a piston. They‘d break😬
@sarchlalaith8836
@sarchlalaith8836 Жыл бұрын
@@saynator never thought you could, you'd use a solid block to Dock. But a torch tower in must other regards right
@Rowlesisgay
@Rowlesisgay Жыл бұрын
@@sarchlalaith8836 i suppose if you also ran the unaltered input to the adder and made that run through where the blocks would be befofre they were pushed sure, but sounds like a lot of work and pistons are a messy system
@srather
@srather Жыл бұрын
Will you be covering serial circuits?
@Cat_Dev-YT
@Cat_Dev-YT Жыл бұрын
A = 1000 (8) B = 101 (5) Invert A (1000 => 0111) Add A and B (0111 + 101 = 1100) result = 1100 Invert result and finish (1000 - 101 = 0011)
@BlueEgg25
@BlueEgg25 11 ай бұрын
I always liked redstone, the day I got my Xbox, I was like “I need a big door.” Now I don’t build doors and do this.
@slyrek9331
@slyrek9331 Жыл бұрын
i learned alot, but i have a question because i'm from spain and don't understand english so well. What X means? (in the explanation part). And another thing that i wanted to ask is, how do you aply the formula for detecting the overflow?
@koushikdas925
@koushikdas925 Жыл бұрын
Binary subtraction in just 2 adic addition . Veritasium made a video on it.
@mihaleben6051
@mihaleben6051 7 ай бұрын
Oh my god im also learning math
@Zephyruxs
@Zephyruxs Жыл бұрын
I like your funny words magic man
@DinosauronTheCool
@DinosauronTheCool Жыл бұрын
can you make a block by block tutoroial for the toggle subtractor / adder
@Swennish-Ball12567
@Swennish-Ball12567 8 ай бұрын
my X-Or-Gates stops working when I try to rebuild my adders to subtractors and it basically turns on every lamp in the output, I think the problem could be in where one of the inputs for the Gate is situated, but it connects to the same redstone dust, so can that be the problem and if no do you know what it could be?
@Iamaperson-o1c
@Iamaperson-o1c 8 ай бұрын
Me too idk
@mohammedjawadpulliyambalat9783
@mohammedjawadpulliyambalat9783 4 ай бұрын
is there a world which includes all of these builds?
@knitnatsnokprogramming
@knitnatsnokprogramming Жыл бұрын
Is that the way computers do Addition and Subtraction?
@samuelhulme8347
@samuelhulme8347 Жыл бұрын
It’s the most common way
@giulio4217
@giulio4217 Жыл бұрын
4:29 Veritasium vibes right here
@FirefoxyLeGibus
@FirefoxyLeGibus Жыл бұрын
if you add a multiplier and a diviser you can make a full ALU
@akinne_
@akinne_ Жыл бұрын
I love this
@TheLegoAnimator863
@TheLegoAnimator863 21 күн бұрын
Cant you use comparators and change hex to binary
@vstechiegamer5996lol
@vstechiegamer5996lol Жыл бұрын
But my adder has 4 bit input and 5 bit output so what do I do?
@eggman3065
@eggman3065 Жыл бұрын
can you show us how to make a binary to bcd converter like the double dabble algorithm in one of the next episodes??
@octopuszombie8744
@octopuszombie8744 Жыл бұрын
The redstone is actually quite simple.
@mrturtlestuff8241
@mrturtlestuff8241 Жыл бұрын
can you show how to make a 4-tick CCA because i cant find a tutorial
Combinational Redstone Devices - LRR #6
16:40
mattbatwings
Рет қаралды 123 М.
Building your INSANE Redstone ideas!
16:05
mattbatwings
Рет қаралды 414 М.
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 62 МЛН
REAL or FAKE? #beatbox #tiktok
01:03
BeatboxJCOP
Рет қаралды 18 МЛН
Mom Hack for Cooking Solo with a Little One! 🍳👶
00:15
5-Minute Crafts HOUSE
Рет қаралды 23 МЛН
I Made Minesweeper with just Redstone!
17:39
mattbatwings
Рет қаралды 258 М.
So I Added WAY Too Many Slimes to Minecraft...
43:40
Fundy
Рет қаралды 93 М.
Simulating The Internet using Redstone Computers!
6:41
lightmonotone
Рет қаралды 3,4 М.
The BEST 1x1 to 10x10 Piston Doors
8:03
avogaado
Рет қаралды 1,4 МЛН
How I Made Geometry Dash In Minecraft
32:13
CraftyMasterman
Рет қаралды 979 М.
We Built Microsoft Paint in Minecraft (again)
11:06
mattbatwings
Рет қаралды 176 М.
Can I Teach My Girlfriend Redstone?
11:40
mattbatwings
Рет қаралды 64 М.
Why I'll Never Use Copper Bulbs
16:14
mattbatwings
Рет қаралды 338 М.
I Made Snake Game with just redstone!
14:31
mattbatwings
Рет қаралды 388 М.
I Made 2048 with just Redstone!
23:01
mattbatwings
Рет қаралды 762 М.