Update! (It's working again!)

For those who don't like/want to read a lot

Just to summarize:

  1. I tried to make Sebastian Lague's simulated computer in Snap!.

  2. I failed horribly when I got to the 4-bit adder. (Post 1, post 2)

  3. I just started another attempt yesterday.

  4. Everything is working out great this time. (For now...)

See how I said, "for now"? Yeah, something went wrong.

Anyways, BH (my savior) gave me an idea to fix it, and it's all working again.

Okay, so remember when I needed a whole lot of help with mainly creating a 4-bit binary adder? (If you don't, here are the forum posts I made on this stuff.)

Well, somehow, when I started another attempt at recreating Sebastian Lague's simulated computer, everything worked immediately.

I am not done with this project. In fact, I've only recreated everything from his first video. I do have a feeling that I may need help with some functions because from what I know, (from watching the whole playlist 5 times already,) I bet that the code is going to become way more complicated. (So be ready.)

Anyways, I just wanted to say this, because I'm very excited to be working on this, and to have it all finally working. I'm now on the second video in Sebastian's playlist, meaning I'll be working on memory. Have a nice day/night for now!

The project containing the blocks.

4/28 7:54 PM

Okay. I might've screwed something up by accident...

Yes, I said everything was working, and it was. Now, after putting everything in a custom category, the ALU isn't working...

I think my issue is that when there's no boolean input, it turns into a 0, and the ALU gets confused when trying to add 0's to boolean inputs.


4/29 8:55 AM

Problem (sort of) solved by BH, even though I did something different. As long as it works, I guess.

Now I will move on to memory. Thanks, @bh!

I'm glad your understanding of the project is advancing.

Yeah, sure, your ALU simulated circuit might well not like a Snap! Boolean False value. Try putting
after a procedure call returns a value. I'm afraid I don't have time or energy to read your code in the near future.


Alright, sounds like it'll work.

Oh. That's fine, I won't try to make you read it then.

I did something different, but this still gave me the idea. Thank you!

What I did differently, in order to keep the boolean results, since from what we both know trying to convert it to binary is a pain, was to check if the input was 0 because nothing was reported, and convert it to a false input.

Just so you understand what I'm saying, in case you don't, this is the very small script I made, and it works:
IF Reporter

And by only doing that in the NAND and XOR gates, everything was fixed.

Ah, great!

I don't quite understand this:

Converting numbers to binary can be painful, I guess, but a Boolean is just a single bit, and you can just
untitled script pic

I'm talking about the original binary adder.

Good point...

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.