To do this tutorial:
You must install Scratch of their website:
And be clear(ish) on how to use it’s interface, the picture below may help (done by me).
There are more feature which you can explore, by the features below are the only ones you need.
By the way, all blocks are colour coded.
Also, to connect 2 blocks, drag a block below another one until a white line shows, then let go of the mouse and they should connect.
Making a Binary To Decimal Convertor In Scratch (I might show how to do in Minecraft):
BTEOTLIWBA (By the end of this lesson I will be able to), is what any boring teacher would say.
But as this is a aj lesson, we can forget all that pointless intro stuff 😀
http://en.wikipedia.org/wiki/Binary_numeral_system as this isn’t 100% clear
First of all, what is binary.
Well, in terms of numbers, this is how binary works.
You may of seen people say a sequence of 0’s and 1’s. 1 byte is 8 bites.
01000000 is 64. To convert a sequence of 0’s and 1’s into decimal use the table/example below,
Method (As This Is Obviously This Is A Cooking Lesson):
You will need:
1. We want the program to respond to the green flag, and then ask the user to enter the input (binary).
2. If the first digit of the binary is 1, then we add 128…
e.c.t 10000000 = 128 Seriously, http://acc6.its.brooklyn.cuny.edu/~gurwitz/core5/nav2tool.html
To create a variable go to variable and click make new variable.
3. Then we just copy and paste, and adjust according to digit.
(So for example, the 4th digit of binary “scans” if it is a 1, if it is, then it will add 16 to the decimal output)
Right click a script to copy and paste!
4. Then we just add a friendly rresponse to the input, which is the output. So something like “00010001 in decimal is 17”
(Remember to add the spaces so it’s readable)
In this case we’re joining (answer/binary input) – in – decimal – is – (decimal output).
5. Now we make it resettable, so each time the output is reset as 0.
(look below the green-flag to see where I’ve added the new script.)
Press the Green-Flag, full screen and start testing!
I Hope you have Enjoyed and hopefully I will make more if you give feedback!
Link to Project: