Binary Conversion
Материал из Поле цифровой дидактики
This tutorial goes over the basics of converting numbers into binary.
Explanation
Binary is a base-2 numerical system that only uses two characters: 0
and 1
Using binary in Scratch projects allows for very simple encoding and decoding of values. Because cloud variables can only use numbers, converting strings into binary can allow for more advanced cloud storage.
Converting Numbers to Binary
This program requires one sprite and four variables. The following variables are required:
Once these variables have been created, the script below should be added to convert a number to binary:
Likewise, the script below should be added to convert binary to numbers:
Example Projects
The following is an example project that converts numbers to binary and back:
See Also
- Binary number on Wikipedia