▲ 709 ▼ Biology OP (mander.xyz) submitted 2 years ago* (last edited 2 years ago) by fossilesque@mander.xyz to c/science_memes@mander.xyz 38 comments fedilink hide all child comments
[–] Omega_Haxors@lemmy.ml 7 points 2 years ago (1 child) Looked into it. It literally is. permalink fedilink source parent hideshow 2 child comments replies: [–] SturgiesYrFase@lemmy.ml 2 points 2 years ago (3 children) But....how? permalink fedilink source parent hideshow 6 child comments replies: [–] Johanno@feddit.de 4 points 2 years ago Once you go down to logic gates. A XOR gate for example makes 1+1 = 0 permalink fedilink source parent [–] icydefiance@lemm.ee 4 points 2 years ago* (1 child) The other replies are simplifying too much. Just adding or subtracting in a loop would be far too slow. A multiplier will find the partial products by using AND gates, and then sum them, which is very similar to long multiplication as they teach you in school. This article explains it pretty well. Division is more complicated. It's sort of done like long division, but apparently that is slow and there's some magic with two's complements that can make it faster. Honestly I don't fully understand it yet. permalink fedilink source parent hideshow 2 child comments replies: [–] SturgiesYrFase@lemmy.ml 2 points 2 years ago That article was really good. I feel like if someone explained it to me at a pub or party I could somewhat talk about it without sounding like a total ludite. permalink fedilink source parent [–] Omega_Haxors@lemmy.ml 2 points 2 years ago* It recursively subtracts until the number goes at or below zero. The iterations is the output and the reminder is how much it went below zero. permalink fedilink source parent
[–] SturgiesYrFase@lemmy.ml 2 points 2 years ago (3 children) But....how? permalink fedilink source parent hideshow 6 child comments replies: [–] Johanno@feddit.de 4 points 2 years ago Once you go down to logic gates. A XOR gate for example makes 1+1 = 0 permalink fedilink source parent [–] icydefiance@lemm.ee 4 points 2 years ago* (1 child) The other replies are simplifying too much. Just adding or subtracting in a loop would be far too slow. A multiplier will find the partial products by using AND gates, and then sum them, which is very similar to long multiplication as they teach you in school. This article explains it pretty well. Division is more complicated. It's sort of done like long division, but apparently that is slow and there's some magic with two's complements that can make it faster. Honestly I don't fully understand it yet. permalink fedilink source parent hideshow 2 child comments replies: [–] SturgiesYrFase@lemmy.ml 2 points 2 years ago That article was really good. I feel like if someone explained it to me at a pub or party I could somewhat talk about it without sounding like a total ludite. permalink fedilink source parent [–] Omega_Haxors@lemmy.ml 2 points 2 years ago* It recursively subtracts until the number goes at or below zero. The iterations is the output and the reminder is how much it went below zero. permalink fedilink source parent
[–] Johanno@feddit.de 4 points 2 years ago Once you go down to logic gates. A XOR gate for example makes 1+1 = 0 permalink fedilink source parent
[–] icydefiance@lemm.ee 4 points 2 years ago* (1 child) The other replies are simplifying too much. Just adding or subtracting in a loop would be far too slow. A multiplier will find the partial products by using AND gates, and then sum them, which is very similar to long multiplication as they teach you in school. This article explains it pretty well. Division is more complicated. It's sort of done like long division, but apparently that is slow and there's some magic with two's complements that can make it faster. Honestly I don't fully understand it yet. permalink fedilink source parent hideshow 2 child comments replies: [–] SturgiesYrFase@lemmy.ml 2 points 2 years ago That article was really good. I feel like if someone explained it to me at a pub or party I could somewhat talk about it without sounding like a total ludite. permalink fedilink source parent
[–] SturgiesYrFase@lemmy.ml 2 points 2 years ago That article was really good. I feel like if someone explained it to me at a pub or party I could somewhat talk about it without sounding like a total ludite. permalink fedilink source parent
[–] Omega_Haxors@lemmy.ml 2 points 2 years ago* It recursively subtracts until the number goes at or below zero. The iterations is the output and the reminder is how much it went below zero. permalink fedilink source parent