☰ Contents · Computing

Calculating in binary

Lessons 5–6 · 2 lessons · B. Boltayev, M. Mahkamov, A. Azamatov, S. Rahmonqulova. Informatics and Information Technologies, Grade 7. Revised and expanded third edition. “O‘zbekiston milliy ensiklopediyasi” State Scientific Publishing House, Tashkent, 2017
6

Practical lesson

Textbook: p. 32
GoalIndependently adds, subtracts and multiplies binary numbers, finds errors, and adds binary numbers with a fractional part.
New words
check: verifying a result, e.g. by counting or by doing the reverse operation · tekshirisherror: a mistake in a calculation · xatofractional part: the digits written after the comma · kasr qismcomma: separates the whole part from the fractional part · vergul
Explanation

In this practical lesson the three binary operations are practised. Before calculating, write the numbers aligned by places and mark the carries and borrows. To check a subtraction, add the result to the subtrahend: it should give the minuend. Addition can also be checked by subtraction. In binary numbers with a fractional part, line the commas up; if the fractional parts are of different length, add zeros at the end (10,1 = 10,10). Common causes of errors: writing 1 + 1 as 2, forgetting a carry, shifting the rows wrongly in multiplication. Also judge whether the result is of a sensible size.

Worked examples
Adding with a fractional part: 10,1 + 1,11. Equalise the fractional parts: 10,10 + 1,11 = 100,01. Check: 2.5 + 1.75 = 4.25.
Checking a subtraction: 1101 – 101 = 1000; 1000 + 101 should give 1101 – yes, this is the minuend 1101.
Class activity

“Error hunters”: the teacher writes 5 examples on the board (2 deliberately wrong). Pairs find the mistakes and write the correct answers.

Practice
1
Compute 11011 + 1101.
2
Someone wrote 1001 · 11 = 10011. Is it correct? Find the right answer.
3
Compute 100,11 + 1,1 (equalise the fractional parts).
4
Subtract 11011 – 1110 and check by addition.