### What is Binary?

Binary is a base 2 numbering system. It uses 2 numbers 0 and 1 to count and is used by computers to transmit information.

1 digit is a bit.

8 digits is a byte.

### How does binary work?

This video shows how Binary works.

**Need another explanation?**

https://www.youtube.com/watch?v=TD6lcIIOeic

### Curriculum links

There is a requirement for all Australian schools to teach Binary from year 5-8.

States not using the Australian Curriculum will have modified versions of what is required but

**binary**is mentioned in both year 5-6 and year 7-8. If you are using a document that is based on the Australian Curriculum try searching your document for the AC codes below.
In primary years primary often makes sense when taught following a base 10 lesson. Discuss the structure of the base 10 system and then introduce the binary system. Below there are resources both online and offline that can be used to teach this concept.

#### Year 5-6

Examine how whole numbers are used to represent all data in digital systems (ACTDIK015)

**Elaborations**#### Year 7-8

Investigate how digital systems represent text, image and audio data in binary (ACTDIK024)**Elaborations**

## Teacher Professional Learning

For teachers wanting to learn more about binary and digital systems there are four online courses facilitated for free by the University of Adelaide. https://csermoocs.adelaide.edu.au/moocs/. The F-6 Foundation course is useful for any teacher who is new to coding, digital systems and binary and prerequisite knowledge for the App Development and Game Development courses.

The University of Adelaide also offer Federally funded face to face workshops, webinars and virtual assistance for Australian Teachers and schools if you would like to request a course complete the contact request form. https://csermoocs.adelaide.edu.au/about/

## Resources for Teaching Binary

#### Binary Codes

#### Unplugged binary bracelets from http://code.org

####
- Video,
- Lesson plan
- Download
- Unplugged/offline
- https://studio.code.org/s/course2/stage/14/puzzle/1

- Video,
- Lesson plan
- Download
- Unplugged/offline
- https://studio.code.org/s/course2/stage/14/puzzle/1

#### CSUnplugged.org - binary unplugged

- Video
- Photos
- Downloads
- Lesson Plan
- https://classic.csunplugged.org/binary-numbers/
- Activity idea https://kidssteamlab.com/birthday-binary-code-kids/

#### Coding and Art with Binary from http://code.org

####
- Coding
- Online
- Art theme
- https://studio.code.org/s/course4/stage/18/puzzle/1

- Coding
- Online
- Art theme
- https://studio.code.org/s/course4/stage/18/puzzle/1

#### Online Game

####
A game to test your knowledge and understanding binary.
Add the decimal value for binary numbers. Encode the binary codes for decimal numbers.

#### Pixelation

####
This game allows you to use binary to create images with bits and bytes.

### Microbit Binary Quiz - 7-8

The following python code can be used to create a simple project that creates random binary codes up to 31 using the first row of lights on the Microbit, each time you shake it. When you press Button A it will display the answer. I have modified the code so when you press Button B it will clear the screen to save battery.

When using this lesson you might talk through the process using a flow chart so students understand the process.

Tip:

For students who have difficulty typing, speed or accuracy, you may have this code saved somewhere as a file students can copy to their computer so they are not left behind.

let randNumber = 0let line = 0input.onGesture(Gesture.Shake, function () {

basic.clearScreen()

randNumber = Math.randomRange(0, 31)

decimalToLED(line, randNumber)

})

input.onButtonPressed(Button.A, function () {

basic.showNumber(randNumber)

basic.pause(3000)

})

input.onButtonPressed(Button.B, function () {

basic.clearScreen()

})

line = 0basic.showIcon(IconNames.Diamond)

function decimalToLED(yvalue: number, decimalNumber: number): void {

//check every of 5 bits and toogle led for (let index = 0; index <= 4; index++) {

}

/* the first bit is led 4 (on the right) the fifth bit is led 0 zahl&1 */

if ((decimalNumber & 1) == 1) {

led.toggle(4, yvalue);

}

if (((decimalNumber & 2) >> 1) == 1) {

led.toggle(3, yvalue);

}

if (((decimalNumber & 4) >> 2) == 1) {

led.toggle(2, yvalue)

}

if (((decimalNumber & 8) >> 3) == 1) {

led.toggle(1, yvalue)

}

if (((decimalNumber & 16) >> 4) == 1) {

led.toggle(0, yvalue)

}

}

Note:basic.clearScreen()

randNumber = Math.randomRange(0, 31)

decimalToLED(line, randNumber)

})

input.onButtonPressed(Button.A, function () {

basic.showNumber(randNumber)

basic.pause(3000)

})

input.onButtonPressed(Button.B, function () {

basic.clearScreen()

})

line = 0basic.showIcon(IconNames.Diamond)

function decimalToLED(yvalue: number, decimalNumber: number): void {

//check every of 5 bits and toogle led for (let index = 0; index <= 4; index++) {

}

/* the first bit is led 4 (on the right) the fifth bit is led 0 zahl&1 */

if ((decimalNumber & 1) == 1) {

led.toggle(4, yvalue);

}

if (((decimalNumber & 2) >> 1) == 1) {

led.toggle(3, yvalue);

}

if (((decimalNumber & 4) >> 2) == 1) {

led.toggle(2, yvalue)

}

if (((decimalNumber & 8) >> 3) == 1) {

led.toggle(1, yvalue)

}

if (((decimalNumber & 16) >> 4) == 1) {

led.toggle(0, yvalue)

}

}

The original code reference is here on Hackster.io

The original source of the binary table here Meridith is the NSW Project Officer for the CSER program with the University of Adelaide. https://csermoocs.adelaide.edu.au/

The original source of the binary table here Meridith is the NSW Project Officer for the CSER program with the University of Adelaide. https://csermoocs.adelaide.edu.au/

## Comments

## Post a Comment