0% found this document useful (0 votes)
7 views

NumberSystems

Uploaded by

bpallab897
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

NumberSystems

Uploaded by

bpallab897
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Digital Logic: Class 1-2

Number systems:
To express any number we can use combina�ons of ten dis�nct symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. Hence this
number-system is called decimal number-system or base-ten-number-system. The symbols are known as the digits. In
this number-system, we combine more than one symbols to express numbers greater than nine. There is a patern in
which digits are combined sequen�ally. (Leading zeros on the le� does not change the value of the number.)

Suppose we are allowed to use more than ten dis�nct symbols to express numbers: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C,
D, E, and F. Here we have sixteen symbols and therefore we can express all numbers up to fi�een with a single
symbol. Sixteen onwards, we must combine two (or more) symbols together. However, the patern in which more
than one symbols are combined together is similar to that in the decimal system. This is known as the hexadecimal-
number-system or base-sixteen-number-system.

Similarly, if we are restricted to use only eight dis�nct symbols: 0, 1, 2, 3, 4, 5, 6, and 7, we will have the base-eight-
number-system or the octal-number-system.

In this way, it is possible to express any number with just two dis�nct symbols: 0, and 1. This is the binary-number-
system or base-two-number-system. Now the symbols 0, and 1 are called the bits. This is the system that all the
computers and digital electronics work on (why?).

VALUE Decimal system Hexadecimal system Octal system Binary Form


Zero (000)10 (000)16 (000)8 (0000)2
One (001)10 (001)16 (001)8 (0001)2
Two (002)10 (002)16 (002)8 (0010)2
Three (003)10 (003)16 (003)8 (0011)2
Four (004)10 (004)16 (004)8 (0100)2
Five (005)10 (005)16 (005)8 (0101)2
Six (006)10 (006)16 (006)8 (0110)2
Seven (007)10 (007)16 (007)8 (0111)2
Eight (008)10 (008)16 (010)8 (1000)2
Nine (009)10 (009)16 (011)8 (1001)2
Ten (010)10 (00A)16 (012)8 (1010)2
Eleven (011)10 (00B)16 (013)8 (1011)2
Twelve (012)10 (00C)16 (014)8 (1100)2
Thirteen (013)10 (00D)16 (015)8 (1101)2
Fourteen (014)10 (00E)16 (016)8 (1110)2
Fi�een (015)10 (00F)16 (017)8 (1111)2
Sixteen (016)10 (010)16 (020)8 ⋮
Seventeen (017)10 (011)16 (021)8
Eighteen (018)10 (012)16 (022)8
Nineteen (019)10 (013)16 (023)8
Twenty (020)10 (014)16 (024)8
⋮ ⋮ ⋮ ⋮
Sixty-three (077)8
Sixty-four (100)8
⋮ ⋮ ⋮
Ninety-nine (099)10
Hundred (100)10
⋮ ⋮ ⋮
Two hundred and fi�y-five (0FF)16
Two hundred and fi�y-six (100)16
Observe the paterns above
Home Work:
Memorize zero to sixteen in all the systems above
Please note:
In decimal system, 10 means ten;
in hexadecimal system, 10 means sixteen;
in octal system, 10 means 8; and
in binary system, 10 means two.
Hence to avoid confusion, we may explicitly express which number system we are using with the subscripts as:
( • )10, ( • )16, ( • )8, or ( • )2,

Conversion from one system to another:

In decimal system, the number three thousand four hundred and fi�y-six, (3456)10 can be expressed as
3456 = 3 × 103 + 4 × 102 + 5 × 101 + 6 × 100 … 1
The symbols at different places (posi�ons) have different weightage (significance).

The right-most symbol has the least weightage (significance) and it is known as the least-significant-digit.
The le�-most symbol has the highest weightage (significance) and it is known as the most-significant-digit.
Right-most Second right- Third right-most … n-th digit from
digit most digit digit the right
0 1 2
Weight/ Significance in 10 10 10 … 10𝑛𝑛−1
decimal system Ten raised to the Ten raised to the power Ten raised to the Ten raised to the power
power zero one power two (n-1)

In other number systems as well the symbols at different posi�ons have different weightage or significance.
Right-most Second right-most Third right-most … n-th symbol from
symbol symbol symbol the right
0 1 2
Weightage in 16 16 16 … 16𝑛𝑛−1
hexadecimal system Sixteen raised to the Sixteen raised to the Sixteen raised to the Sixteen raised to the
power zero power one power two power (n-1)
Weightage in octal 80 81 82 … 8𝑛𝑛−1
system Eight raised to the Eight raised to the power Eight raised to the Eight raised to the power
power zero one power two (n-1)
Weightage in binary 0 1 2 … 𝑛𝑛−1
2 2 2 2
system Two raised to the Two raised to the power Two raised to the power Two raised to the power
power zero one two (n-1)
In all the systems, the le�most symbol is most-significant, and the rightmost symbol is least-significant (weight = 1).

In general, the weight for the 𝑛𝑛-th symbol from the right in base 𝑟𝑟 system is = 𝑟𝑟 𝑛𝑛−1

Food for thought: Prove the above using the knowledge of permuta�ons and combina�ons
Conversion from other systems to the decimal system:
Example: Find the decimal equivalent of the binary number (1010)2
The decimal equivalent of (1010)2
= �1 × (23 ) + 0 × (22 ) + 1 × (21 ) + 0 × (20 )�10
= �1(8) + 0(4) + 1(2) + 0(1)�10
= (10)10

Example: Find the decimal equivalent of the hexadecimal number (FACE)16


The decimal equivalent of (FACE)16
= �15 × (163 ) + 10 × (162 ) + 12 × (161 ) + 14 × (160 )�10
= �15(4096) + 10 × (256) + 12 × (16) + 14 × (1)�10
= (64206)10
Find the decimal equivalent of the octal number (4321)8

1
Here all symbols in blue have their usual meaning as in the decimal number system
Example: The decimal equivalent of (4321)8
= �4 × (83 ) + 3 × (82 ) + 2 × (81 ) + 1 × (80 )�10
= �4 × (512) + 3 × (64) + 2 × (8) + 1 × (1)�10
= (2257)10

Conversion from decimal to the binary system:

Example: Find the binary equivalent of the decimal number (25)10

Write the remainders from the botom to the top as: 11001
This is the binary equivalent of the decimal number (25)10
Thus (25)10 = (11001)2

Food for thought


Solve the above ques�on in a different manner
Suppose (25)10 = (𝑥𝑥4 𝑥𝑥3 𝑥𝑥2 𝑥𝑥1 𝑥𝑥0 )2 Where 𝑥𝑥4 , 𝑥𝑥3 , 𝑥𝑥2 , 𝑥𝑥1 , 𝑥𝑥0 are unknowns and they are all either 0 or 1.
∴ 𝑥𝑥4 (24 ) + 𝑥𝑥3 (23 ) + 𝑥𝑥2 (22 ) + 𝑥𝑥1 (21 ) + 𝑥𝑥0 (20 ) = 25
From this find out the values of 𝑥𝑥4 , 𝑥𝑥3 , 𝑥𝑥2 , 𝑥𝑥1 , and 𝑥𝑥0 .
When you do that, you may realize where the first method of remainders come from

Example: Find the octal equivalent of the decimal number (2257)10

Write the remainders from the botom to the top as: 4321
This is the binary equivalent of the decimal number (2257)10
Thus (2257)10 = (4321)8

Example: Find the hexadecimal equivalent of the decimal number (64206)10

Write the remainders from the botom to the top as: FACE
This is the binary equivalent of the decimal number (64206)10
Thus (64206)10 = (𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹 )16

So far, we have leant to covert decimal numbers to other systems and from any other system to the decimal system.
Hence, we can convert from any system to any other system.

There is a direct way to convert between binary and hexadecimal systems


Example: Convert (1010101101)2 into hexadecimals
(1010101101)2
= 0010 1010 1101)2
( [grouped into fours star�ng from the right, appending zeros to the le� if required.]
=( 2 𝐴𝐴 𝐷𝐷)16 [convert each group of fours to hexadecimal independently. Isn’t it so simple]

Food for thought


Find out why this method work.
Hint:
(10 1010 1101)2
= 1(29 ) + 0(28 ) + 1(27 ) + 0(26 ) + 1(25 ) + 0(24 ) + 1(23 ) + 1(22 ) + 0(21 ) + 1(20 )
= 162 �0(23 ) + 0(22 ) + 1(21 ) + 0(20 )� + 16�1(23 ) + 0(22 ) + 1(21 ) + 0(20 )� + �1(23 ) + 1(22 ) + 0(21 ) + 1(20 )�
Example: Convert (𝐶𝐶𝐶𝐶𝐶𝐶)16 into binary
(𝐶𝐶𝐶𝐶𝐶𝐶)16
= ( 𝐶𝐶 𝐴𝐴 𝐵𝐵)16
= (1100 1010 1011)2

There is also a direct way to convert between binary and octal systems
Example: Convert (1010011)2 into octal form
(1010011)2
= (001 010 011)2 [grouped into threes star�ng from the right, appending zeros to the le� if required.]
=( 1 2 3)8 [convert each group of three to octal form independently.]

Example: Convert (2025)8 into binary


(2025)8
=( 2 0 2 5)8
= (010 000 010 101)2

Represen�ng frac�ons in different number systems:


In decimal system, the frac�on (.3456)10 can be expressed as
.3456 = 3 × 10−1 + 4 × 10−2 + 5 × 10−3 + 6 × 10−4
Again, the symbols at different places (posi�ons) have different weightage (significance).

The le�-most symbol a�er the decimal point has the highest weightage (significance) 10−1 .
The weightage/significance keeps reducing as we move towards the right.
First digit a�er Second digit a�er Third digit a�er … n-th digit a�er
the point the point the point the point
Weight/ Significance in 10 −1
10 −2
10−3 … 10−𝑛𝑛
decimal system Ten raised to the power Ten raised to the power Ten raised to the power Ten raised to the
minus one minus two minus three power −𝑛𝑛

Similarly in other number systems we have


First symbol a�er Second symbol Third symbol a�er … n-th symbol a�er
the point a�er the point the point the point
Weightage in 16−1 16−2 16−3 … 16−𝑛𝑛
hexadecimal system Sixteen raised to the Sixteen raised to the power Sixteen raised to the Sixteen raised to the
power minus one minus two power minus three power −𝑛𝑛
−1 −2 −3 −𝑛𝑛
Weightage in octal 8 8 8 … 8
system Eight raised to the power Eight raised to the power Eight raised to the power Eight raised to the power
minus one minus two minus three −𝑛𝑛
−1 −2 −3 −𝑛𝑛
Weightage in binary 2 2 2 … 2
system Two raised to the power Two raised to the power Two raised to the power Two raised to the power
minus one minus two minus three −𝑛𝑛
Thus, the le�most symbol is most-significant, and the rightmost symbol is least-significant.

Conversion from other systems to the decimal system:


Example: Find the decimal equivalent of the binary number (101.101)2
𝟏𝟏 𝟎𝟎 𝟏𝟏 . 𝟏𝟏 𝟎𝟎 𝟏𝟏
1
Weight 2 2 2 20 2−1 2−2 2−3
Thus, the decimal equivalent of (101.101)2 = 1(22 ) + 0(21 ) + 1(20 ) + 1(2−1 ) + 0(2−2 ) + 1(2−3 )
= 5 + 0.5 + 0.125
= 𝟓𝟓. 𝟔𝟔𝟔𝟔𝟓𝟓𝟏𝟏𝟏𝟏
Example: Find the decimal equivalent of the hexadecimal number (2BA.420)16
2 𝑩𝑩 𝑨𝑨 . 𝟒𝟒 𝟐𝟐 𝟎𝟎
Weight 162 161 160 16−1 16−2 16−3
Decimal equivalent of (2BA.420)16= 2(162 ) + 11(161 ) + 10(160 ) + 4(16−1 ) + 2(16−2 ) + 0(16−3 )
= 698 + 0.25 + 0.0078125
= 𝟔𝟔𝟔𝟔𝟔𝟔. 𝟐𝟐𝟐𝟐𝟐𝟐𝟐𝟐𝟐𝟐𝟐𝟐𝟓𝟓𝟏𝟏𝟏𝟏

Example: Find the decimal equivalent of the octal number (25.12)8


Decimal equivalent of the octal number (25.12)8
= 2(81 ) + 5(80 ) + 1(8−1 ) + 2(8−2 )
= 𝟐𝟐𝟐𝟐. 𝟏𝟏𝟏𝟏𝟏𝟏𝟏𝟏𝟓𝟓𝟏𝟏𝟏𝟏

Conversion from the decimal system to other systems:


Example: Find the binary equivalent of the decimal number (0.8125)10

Write the overflows from the top to the botom as: 0.1101…
This is the binary equivalent of the decimal number (0.8125)10
Thus (0.8125)10 ≈ (0.1101)2

Example: Find the binary equivalent of the decimal number (0.6)10

Write the overflows from the top to the botom as: 0.10011…
(in this case, it never ends, but we must stop at some point depending on how much
precision we want)
This is the binary equivalent of the decimal number (0.6)10
Thus (0.6)10 ≈ (0.10011)2

Example: Find the octal equivalent of the decimal number (0.8125)10

Write the overflows from the top to the botom as: 0.64
This is the octal equivalent of the decimal number (0.8125)10
Thus (0.8125)10 ≈ (0.64)8

Example: Find the hexadecimal equivalent of the decimal number (0.8125)10


Thirteen in hexadecimal is C.
Write the overflows from the top to the botom as: 0.C
This is the hexadecimal equivalent of the decimal number (0.8125)10
Thus (0.8125)10 ≈ (0. 𝐶𝐶 )16

Another way to convert (𝟎𝟎. 𝟔𝟔𝟔𝟔)𝟖𝟖 into hexadecimal form


(0. 6 4)8
= (0. 110 100)2 [Express each octal symbol as three bits]
= (0. 1101 0000)2 [Group the bits into fours]
( )
= 0. 𝐵𝐵 0 16 [Express groups of four bits with hexadecimal symbols]
Now we focus on binary numbers only.
Ques�on: How many different numbers can be expressed using n bits?
Answer: 2𝑛𝑛 (Prove yourselves)

Ques�on: Find the highest (posi�ve) integer that can be expressed with an n-bit binary number.
Answer: 2𝑛𝑛 − 1 (Prove yourselves)

Ques�on: How many bits are required to express a posi�ve integer 𝑋𝑋?
Answer: ⌈log 2 𝑋𝑋⌉ (Prove yourselves)

Binary Arithme�c
Addi�on:
0 + 0 = 0 (Zero + Zero = Zero)
0 + 1 = 1 (Zero + One = One)
1 + 0 = 1 (One + Zero = One)
1 + 1 = 10 (One + One = Two) We say One + One sums to Zero and yield a carry of One

1 + 1 + 1 = 11 (One + One +One = Three) We say One + One +One sums to One and yield a carry of One

Mul�-bit binary addi�on can be performed on pen and paper just like decimal addi�on
Example: Add two-hundred-eighteen and two-hundred-one
two-hundred-eighteen in binary is 11011010
two-hundred-one in binary is 11001001

1 1 0 1 1 0 1 0 = two-hundred-eighteen
+ 1 1 0 0 1 0 0 1 = two-hundred-one
= four-hundred-nineteen

Subtrac�on:
0 – 0 = 0 (Zero – Zero = Zero)
1 – 0 = 1 (One – Zero = One)
1 – 1 = 1 (One – One = Zero)

0 – 1 = ? (Zero-One=?)
We borrow a 1 to the le� of the minuend and write it as 10 – 1 (two – one)
This results in a difference of 1 with a borrow of 1

0 – 1 – 1 = ?(Zero-One-One=?)
We borrow a 1 to the le� of the minuend and write it as 10 – 1–1 (two – one – one)
This results in a difference of 0 with a borrow of 1

Mul�-bit binary subtrac�on can be performed on pen and paper just like decimal subtrac�on
Example: Subtract one-hundred-six from one-hundred-forty-seven
one-hundred-forty-seven in binary is 10010011
one-hundred-six in binary is 1101010
1 0 0 1 0 0 1 1 = one-hundred-forty-seven
– 1 1 0 1 0 1 0 = one-hundred-six
= forty-one

Mul�plica�on:
0 × 0 = 0 (Zero × Zero = Zero)
0 × 1 = 0 (Zero × One = Zero)
1 × 0 = 0 (One × Zero = Zero)
1 × 1 = 1 (One × One = One)

Mul�-bit binary mul�plica�on can be found on pen and paper just like decimal mul�plica�on
Example: Mul�ply five with six
six in binary is 110
five in binary is 101
1 1 0 = six
× 1 0 1 = five
1 1 0
0 0 0
+ 1 1 0
1 1 1 1 0 = thirty

Division:
Example: Divide twenty-two with six
Twenty-two in binary is 10110
Six in binary is 110
1 1 0 1 0 1 1 0 0 1 1
0 0 0
1 0 1 1
1 1 0
1 0 1 0
1 1 0
1 0 0

Complements:
One’s complement in binary:
Given a binary number, if we replace all the zero bits with one and all the one its with zero, we get one’s complement
of the given number
Example: 1’s complement of 1010 is 0101

Two’s complement in binary:


Two’s complement of a binary number = (One’s complement of the number) + 1
Example: 2’s complement of 1010
= (1’s complement of 1010) + 1
= 0101 + 1
= 0110
Interpreta�on of 1’s complement:
Suppose 𝑥𝑥 is an n-bit binary number
The largest number that we can represent with n-bits = 11…11 (a series of n ones)
1’s complement of 𝑥𝑥 is = the largest n-bit number − 𝑥𝑥 (Prove yourselves)

Interpreta�on of 2’s complement:


Suppose 𝑥𝑥 is an n-bit binary number
2’s complement of 𝑥𝑥 is = the largest n-bit number − 𝑥𝑥 + 1
= the smallest (n+1)-bit number − 𝑥𝑥 (Prove yourselves)
Where the smallest (n+1)-bit number = 1000… (a 1 followed by a series of n zeros)

Nine’s complement in decimal:


Given a decimal number, if we replace all the digits with their difference from nine, we get nine’s complement of the
given number
Example: 9’s complement of 5294301687 is 4705698312

Ten’s complement in decimal:


Ten’s complement of a decimal number = (Nine’s complement of the number) + 1
Example: 10’s complement of 5294301687 is (4705698312 + 1) = 4705698313

Interpreta�on of 9’s complement:


Suppose 𝑥𝑥 is an n-digit binary number
The largest number that we can represent with n-digits = 99…99 (a series of n nines)
9’s complement of 𝑥𝑥 is = the largest n-digit number − 𝑥𝑥 (Prove yourselves)

Interpreta�on of 10’s complement:


Suppose 𝑥𝑥 is an n-bit binary number
10’s complement of 𝑥𝑥 is = the largest n-digit number − 𝑥𝑥 + 1
= the smallest (n+1)-digit number − 𝑥𝑥 (Prove yourselves)
Where the smallest (n+1)-digit number = 1000… (a 1 followed by a series of n zeros)

You should know


• A group of 8 bits is called a byte (by eight)
• A group of 4 bits is called a nibble

Representa�on of nega�ve binary numbers:


Suppose we choose to use 4 bits to store any number.
With 4 bits, one can store 24 = 16 different paterns of zeros and ones,
i.e. with 4 bits one can represent 16 different numbers.
If the numbers are integers, then with 4 bits we can represent zero, one, two, … up to fi�een.
But if we also want to represent nega�ve integers, sign-magnitude representa�on (discussed below) is o�en a
natural choice.

Sign-magnitude representa�on of nega�ve numbers


1 1 0 1
Sign Value/
bit Magnitude
The le�-most bit is the sign bit.
If the sign bit is 0 then the number is to be interpreted as posi�ve.
If the sign bit is 1 then the number is to be interpreted as nega�ve.

The remaining three bits represent the value or the magnitude of the number
In the above example the number is nega�ve (sign bit is 1). And the magnitude is 101 i.e. five. Hence the above
example represents minus five.

This way, with 4 bits, we can represent integers from minus seven to plus seven.
This way, 0 000 and 1 000 both represents zero – that’s not good.

Example:
Plus three should be represented as 0 011.
Minus two should be represented as 1 010.
Now if we want to add plus three and minus two, how should we do that – that’s to clumsy.

There is a beter way to represent nega�ve numbers which makes arithme�c very simple. This is known as 2’s
complement representa�on discussed below.

2’s complement representa�on of nega�ve numbers


The botom most row of We get 0000 by adding ONE to 1111,
0 0 1 0 Table 1 contains zero. If 0 1 1 1 Seven hence we can interpret 1111 as
0 0 0 1 we add ONE to the 0 1 1 0 Six minus one.
0 0 0 0 botom most number 0 1 0 1 Five
1 1 1 1 we get the number in 0 1 0 0 Four Similarly,
1 1 1 0 the second botom most 0 0 1 1 Three we get 1111 by adding ONE to 1110,
1 1 0 1 row. Each row contains 0 0 1 0 Two hence we can interpret 1110 as
1 1 0 0 the number that we get 0 0 0 1 One minus two.
1 0 1 1 by adding ONE to the 0 0 0 0 Zero
1 0 1 0 row below it. 1 1 1 1 Minus One We get 1110 by adding ONE to 1101,
1 0 0 1 1 1 1 0 Minus Two hence we can interpret 1101 as
This way, when we add minus three.
1 0 0 0 1 1 0 1 Minus Three
ONE to 1111, the result
0 1 1 1 1 1 0 0 Minus Four
overflows and we get And so on.
0 1 1 0 1 0 1 1 Minus Five
back to zero again. Thus,
0 1 0 1 1 0 1 0 Minus Six
one may interpret 1111 Note:
0 1 0 0 1 0 0 1 Minus Seven
as minus one which Le�most bit of posi�ve numbers is 0.
0 0 1 1 yields zero when we add 1 0 0 0 Minus Eight Le�most bit of posi�ve numbers is 1.
0 0 1 0 ONE to it.
0 0 0 1 Table 2: 2’s complement Note: In Table 2,
0 0 0 0 We create Table 2, by representa�on of signed Minus one is 2’s complement of one.
circularly rota�ng the numbers Minus two is 2’s complement of two.
Table 1 numbers in Table 1 …
downwards. Minus eight is 2’s complement of
eight.

Now we generalize the above idea for n bits.

Consider we represent numbers with n bits.


A posi�ve number +𝑥𝑥 is represented with its ordinary binary form.
A nega�ve number −𝑥𝑥 is represented with its 2’s complement form, i.e. 2𝑛𝑛 − 𝑥𝑥.
This way, the largest posi�ve integer we can represent is 2𝑛𝑛−1 − 1 = (01111 … )2 (a zero followed by 𝑛𝑛 − 1 ones)
The smallest nega�ve integer we can represent is −2𝑛𝑛−1 = (10000 … )2 (a one followed by 𝑛𝑛 − 1 zeros)
Note:
(+𝑥𝑥 ) + (−𝑥𝑥 ) = (𝑥𝑥 ) + (2𝑛𝑛 − 𝑥𝑥 ) = 2𝑛𝑛 = 10000 … (one followed by n zeros). The le�-most one does not fit within n
bits. The le�most one overflows and only n zeros remain. Thus, the result becomes zero.
Example: Consider 8-bit signed representa�on of integers.
Twenty-five is represented as 00011001.
Minus twenty-five is represented as 11100111.
This way,
the largest posi�ve integer we can represent is 28−1 − 1 = 127 = (01111111)2 (a zero followed by 7 ones).
The smallest nega�ve integer we can represent is −2𝑛𝑛−1 = −128 = (100000000)2 (a one followed by 7 zeros)

Example: Consider 4-bit signed representa�on of integers.


Plus three is represented as 0011.
Minus two is represented as 1110.
What happens when we add plus three and minus two?

0 0 1 1 = Plus three
+ 1 1 1 0 = Minus two
1 0 0 0 1 = Plus one

Thus, signed numbers can be added just like ordinary unsigned numbers.

2’s complement representa�on of signed numbers allows to mul�ply of signed-numbers just like ordinary unsigned
numbers.
Example: Mul�ply minus two and three using 4-bit signed 2’s complement representa�on
4-bit signed 2’s complement representa�on of minus two is 1110
4-bit signed 2’s complement representa�on of three is 0011
1 1 1 0 = minus two
× 0 0 1 1 = plus three
1 1 1 0
1 1 1 0
0 0 0 0
+ 0 0 0 0
0 1 0 1 0 1 0 = minus six

You might also like