Redstone Binary Subtraction - LRR #5

70,692
0
Published 2023-06-17
In this episode, we explore negative number formats and build a toggleable adder/subtractor.

Patreon: www.patreon.com/mattbatwings
Discord: discord.gg/V5KFaF63mV
My socials: linktr.ee/mattbatwings
My texture pack: modrinth.com/resourcepack/mattpack
World Download: (JAVA 1.18.2) www.planetminecraft.com/project/redstone-binary-su…

Overflow Detection in 2's Complement    • Twos Complement Addition & Overflow  

-------------------------

Want to get more involved in the logical redstone community?
Learn Logical Redstone!    • Logical Redstone Reloaded  
Open Redstone Engineers (ORE): openredstone.org/

0:00 Introduction
1:01 Signed Magnitude
3:08 Modular Arithmetic
6:23 Two's Complement
8:56 Building a Subtractor
9:46 Building a Toggleable Adder/Subtractor
11:30 Sentiment
12:34 Another Cool Fact
13:08 One's Complement
13:37 Subscribe!

Music (in order):
Infraction - Photograph    • Vlog lo-fi Anime Fashion by Infractio...  
Harris Heller - Guilty Spark    • Guilty Spark  
Infraction - Sapporo    • Lo-Fi Anime Fashion Chill by Infracti...  
Harris Heller - Plethora    • Plethora  
Gareth Coker - Firefly in a Fairytale (Veritasium Theme)    • Firefly in a Fairytale by Gareth Coke...  
Alexander Nakarada - Favorite    • Favorite  
LuKremBo - Biscuit    • (no copyright music) lofi type beat “...  
Harris Heller - Streamline    • Streamline  
Harris Heller - Iridescent    • Iridescent  
Infraction - Serotonin    • Vlog Lo-Fi Chill by Infraction [No Co...  
PRNV - Happy High    • Happy High || happy lofi music || PRN...  
Milky Wayvers - Love in Japan    • Love in Japan  
Harris Heller - In My Shadow    • In My Shadow  
Harris Heller - Manhattan Project    • Manhattan Project  
Harris Heller - Singularity    • Singularity  
Mellowind - Bored    • Bored || Vibin in the 80s  

All Comments (21)
  • @CraftyMasterman
    lrr is such a force of nature, not even SICKNESS could stop HIM!!!
  • @ok-y-pull-up
    Matt explains the most complex thing so well is not normal
  • @rodrigoqteixeira
    GUYS WE FINALLY KNOW WHY INVERTING AND ADDING 1 WORKS!!! I'M SO HAPPY :)
  • @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!
  • @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.
  • @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! 🙂
  • @Str4ky
    I learn more in 1 min 30s with this video than in 5 years of school with professors
  • @samuelbudzinak
    Love that veritasium music when explaining using clock
  • @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
  • @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.
  • @UnPandaOrange
    Great revision of my comp sci classes with a Minecraft aspect on top, love it!
  • @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.
  • @toblobs
    Great vid as always, keep up the work Matt
  • @soundest8768
    This is the best explanation of 2’s Complement I’ve heard so far! Thank you!
  • @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.
  • @AntxnBeats
    Your actually making computer science even more fun and understanding. Thanks A LOT
  • @tonerrr4295
    You are actually the best. These are so well explained, and amazingly made. Learning these concepts on fun and easy, keep it up!
  • @Rexus2
    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.
  • @boomsandapples2640
    These videos are great, I am learning so much! Thank you for this awesome series!
  • @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!!