0% found this document useful (0 votes)
2 views3 pages

Notes_Lesson1

The document explains number systems, focusing on denary (decimal) and binary systems, including their conversion methods. It details the processes for converting between binary and denary, as well as how to represent positive and negative numbers using one’s and two’s complement. Additionally, it covers binary addition and subtraction, and introduces the concept of memory size in computers measured in bytes.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views3 pages

Notes_Lesson1

The document explains number systems, focusing on denary (decimal) and binary systems, including their conversion methods. It details the processes for converting between binary and denary, as well as how to represent positive and negative numbers using one’s and two’s complement. Additionally, it covers binary addition and subtraction, and introduces the concept of memory size in computers measured in bytes.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Number Systems

Denary(Decimal) Numbers- Base 10 numbers. This uses the digits 0 to 9 which are placed
in ‘weighted’ columns.

Binary Number Systems - Base 2 number system with digits 0 & 1. A switch in
the ON position can be represented by 1; a switch in the OFF position can be
represented by 0. Each of the binary digits are known as bits.

The binary system uses 1s and 0s only which gives these corresponding
weightings:

128 64 32 16 8 4 2 1
27 26 25 24 23 22 21 20

Converting from binary to denary and from denary to binary

Convert 1 1 1 0 1 1 1 0 to denary
2 107 Reminde
r1
2 53 1
2 26 0
2 13 1
2 6 0
2 3 1
2 1 1
2 0 0

Each time a 1 appears in a column, the column value is added to the total. For
example, the binary number above is:
128 + 64 + 32 + 8 + 4 + 2 = 238 (denary)

Converting from denary to binary


Convert 107 to binary
Showing positive & negative numbers
One’s compliment :-
each digit in the binary number is inverted. 1 becomes 0 and 0 becomes 1.
For example, 0 1 0 1 1 0 1 0 (denary value 90) becomes 1 0 1 0 0 1 0 1
(denary value −90).

Two’s compliment :-
Each digit in the binary number is inverted and a ‘1’ is added to the right-most
bit. For example, 0 1 0 1 1 0 1 0 (denary value 90) becomes:
10100101
+1
= 1 0 1 0 0 1 1 0 (since 1 + 1 = 0, a carry of 1) = denary value −90
The two’s complement uses these weightings for an 8-bit number
representation:

−128 64 32 16 8 4 2 1
This means:

−128 64 32 16 8 4 2 1
1 1 0 1 1 0 1 0
0 0 1 0 0 1 1 0

The first example is: −128 + 64 + 16 + 8 + 2 = −38


The second example is: 32 + 4 + 2 = 38
The easiest way to convert a number into its negative equivalent is to use two’s
complement.
For example, 104 in binary is 0 1 1 0 1 0 0 0.

To find the binary value for −104 using two’s complement:


invert the digits: 1 0 0 1 0 1 1 1 (+104 in denary)
add 1: 1
which gives: 1 0 0 1 1 0 0 0 = −104)
Binary Addition
−128 64 32 16 8 4 2 1

0 0 1 0 0 1 0 1
+
0 0 1 1 1 0 1 0
=
0 1 0 1 1 1 1 1

This gives us 0 1 0 1 1 1 1 1, which is 95 in denary;

Binary subtraction
To carry out subtraction in binary, we convert the number being subtracted into
its negative equivalent using two’s complement, and then add the two numbers.
Carry out the subtraction 95 – 68 in binary. Example 1.3
Solution
1 Convert the two numbers into binary:
95 = 0 1 0 1 1 1 1 1
68 = 0 1 0 0 0 1 0 0
2 Find the two’s complement of 68:
invert the digits: 1 0 1 1 1 0 1 1
add 1: 1
which gives: 1 0 1 1 1 1 0 0 = −68
3 Add 95 and −68:
−128 64 32 16 8 4 2 1
0 1 0 1 1 1 1 1
+
1 0 1 1 1 1 0 0
=
100011011
The additional ninth bit is simply ignored leaving the binary number 0 0 0 1 1 0 1 1
(denary equivalent of 27, which is the correct result of the subtraction).
Measurement of the size of computer memories
The byte is the smallest unit of memory in a computer. Some computers use
larger bytes, such as 16-bit systems and 32-bit systems, but they are always
multiples of 8. 1 byte of memory wouldn’t allow you to store very much
information; so memory size is measured in these multiples.

You might also like