beanz Magazine

Introduction to Memory Management

John Loo on Flickr

Dive into the nuts & bolts of storing pictures and files on your computer.

Ever wondered what happens behind the scenes when you hit the “run” button and your code springs to life? To develop a deeper understanding of computing, let’s take a look at an essential, if somewhat mysterious process: storing programs in memory.

BREAKING DOWN INTO BINARY

Every variable needs to saved somewhere. Otherwise, your program will forget values when it moves to the next line of code!

At a base level computers work with 0s and 1s. So before we store our data, we must transform numbers, letters, and complex audio-visual objects into simple 0s and 1s.

Small integers (whole numbers) like “5” or “37” are stored as binary versions of themselves. “5” becomes “0101” and “37” is “100101”. For negative numbers, we use a clever system called “two’s complement”. First, you take the binary form of the number’s positive equivalent, then you flip each bit and add one at the end. For example, “5” is flipped from “0101” to “1010”, and then finishes as “1011”. This representation makes it easy to add or subtract integers.

Become a subscriber and get access to the rest of this article. Plus all our magazine articles.

Stories also include numerous links to help parents, kids, and teachers learn more. Get access today at just $15 per year for online magazine only or $29.99/year for print + online ($35/year outside US)!

Subscribe Today!

Also In The December 2018 Issue

Create colourful geometric patterns in SketchUp inspired by the Great Mosque of Cordoba.

Learn how to use animated GIFs to create proper animation loops in Scratch.

Create an electronic obstacle course and test the steadiness of your hands as you navigate through.

What’s allowed in an e-mail address? Let’s break down the syntax.

Throwing your old tech in the trash is bad for the environment. Check out some safer, cleaner alternatives.

New, crafty mods that’ll push your Minecraft design skills to new levels.

Part philosophical paradox, part coding puzzle, quines are sure to tease and challenge your brain!

5 questions with the designer pushing innovation in 3D printed clothes.

All work and no play makes it harder for kids to learn, especially those with anxiety and learning disabilities.

Dive into the nuts & bolts of storing pictures and files on your computer.

A clever AI is creating twisted, surreal art. Math or magic?

Two doors hide a zonk, and one door hides a prize. Can probability & statistics help you pick the right one?

How can you tell if a credit card number is valid or invalid? Meet the Luhn algorithm, one of many checksums helping us keep the internet in order.

Learn about the Destination Dispatch algorithm and create your own robotic lift.

Grab your friends & disconnect from the digital world with these fun science & tech board games.

Interesting stories about computer science, software programming, and technology for December 2018.

Links from the bottom of all the December 2018 articles, collected in one place for you to print, share, or bookmark.