Homeschool Tech Lessons 6-7 – Memory and Minecraft

homeschool techI’m continuing with the homeschool tech lessons based on number systems (binary, decimal and hexadecimal). In the last lesson I moved on to explain how it relates to computers…

Homeschool Tech

I reminded the boys about an on/off button on things – it has a 0 and 1 which stand for off and on respectively. That’s binary – an on/off switch.

Computer memory is full of tons of little switches that can be on or off and, like binary, can be added up to mean larger numbers. Those numbers represent data for files, images, video, music and everything else stored in a computer.

I mentioned ASCII which is how letters and numbers are often stored (e.g., 33 in hexadecimal = the character 3). So when you type a 3 on your keyboard, a 33 hexadecimal is stored to represent that. All letters, numbers, punctuation, etc. have values in ASCII so a text file is stored as those number values.

I explained how old Spanish doubloons were cut into 8 pieces to make a dollar (e.g., pieces of 8 in Pirate-speak). Since 2 pieces were worth a quarter, the chant goes “shave and a haircut, 2 bits!”

In computer storage, 8 bits makes 1 byte (e.g., 1000-0000 or 1010-0011). 1111-1111 would be a full byte (8 bits) of all ‘on’ values. That would equal 255 (see image – bottom left).

With each column added in binary, it doubles so it goes: 1,2,4,8,16,32,64,128,256,512,1024. 1024 is close to 1000 so it’s called a kilo. So 1024 bytes (8,192 bits) is a Kilobyte.

1024 bytes is a kilobyte. 1024 kilobytes is a megabyte. 1024 megabytes is a gigabyte. A gigabyte is 1,073,741,824 bits. That’s a lot of little switches to form just one gigabyte!

Minecrafhomeschool tech minecraftt

We put some of this in Minecraft terms…

We listed several types of blocks in Minecraft (see image – bottom right): grass, sand, obsidian, bedrock and diamond block. We gave each a value: 0,1,2, etc.

Then we talked about how each block has a location in the world including how high it’s located. Those are X, Y and Z values. So for an obsidian block stored at 13, 5, 2 we could get the values:

13 = 1101

5 = 0101

2 = 0010

2 = 0010

Or 1101 0101 0010 0010 – 16 bites or 2 bytes. So if each block took 2 bytes, one megabyte (1,048,576 bytes) could hold 524,288 blocks’ worth of data. One world we looked at in our app for Minecraft was 8.8 megabytes (9,227,469 bytes or 4,613,734 blocks).

Of course a world holds data for your character, mobs, time of day, chests, chests’ contents, time, etc. but you get the idea.

Leave a Reply

Your email address will not be published. Required fields are marked *