Chapter11 Numbering
Chapter11 Numbering
https://youtu.be/k-5jpns0uTA
BITS, BYTES & NIBBLES
Bit – e.g. 0
▪ Each individual 1 or 0 is known as a bit.
▪ Here are three bits – 110
Byte – e.g. 11001100
▪ Each group of 8 bits is known as a Byte
▪ Here is a stream of Bytes:
01010011 01101011 01111001 01110010 01101001 01101101 00100000 01101001
01110011 00100000 01100001 01110111 01100101 01110011 01101111 01101101
01100101 00100001
Nibble – e.g. 1111
▪ A nibble is 4 bits, or half a Byte.
▪ Here is a nibble – 1101
OCTAL NUMBER SYSTEM
The octal number system uses eight digits: 0,1,2,3,4,5,6 and 7 with the base of 8.
The advantage of this system is that it has lesser digits when compared to several other
systems, hence, there would be fewer computational errors.
Digits like 8 and 9 are not included in the octal number system. Just as the binary, the octal
number system is used in minicomputers but with digits from 0 to 7.
For example: 358, 238, 1418 are some examples of numbers in the octal number system.
DECIMAL NUMBER SYSTEM
The decimal number system uses ten digits: 0,1,2,3,4,5,6,7,8 and 9 with the base number as 10.
The decimal number system is the system that we generally use to represent numbers in real
life.
If any number is represented without a base, it means that its base is 10. For example: 72310,
3210, 425710 are some examples of numbers in the decimal number system.
HEXADECIMAL NUMBER SYSTEM
The hexadecimal number system uses sixteen digits/alphabets: 0,1,2,3,4,5,6,7,8,9 and
A,B,C,D,E,F with the base number as 16.
Here, A-F of the hexadecimal system means the numbers 10-15 of the decimal number system
respectively.
This system is used in computers to reduce the large-sized strings of the binary system. For
example, 7B316, 6F16, 4B2A16 are some examples of numbers in the hexadecimal number
system.
DECIMAL TO BINARY CONVERSION
BINARY TO DECIMAL CONVERSION
Lets play a game!!
https://games.penjee.com/binary-
bonanza/game.php
BINARY TO HEXADECIMAL
CONVERSION
HEXADECIMAL TO BINARY
CONVERSION
BINARY CODED DECIMAL (BCD)
Binary Coded Decimal is a form of binary representation where each denary
digit is converted individually into binary, rather than the whole number
being converted as a large number.
356
Decimal to Binary
=> (356)10 = (000101100100)2
BCD
=> 0011 0101 0110
BINARY CODED DECIMAL(BCD)
Why use Binary Coded Decimal?
Binary coded decimal has 3 main advantages
• It is easier for a human to read large binary numbers than if the number is in pure binary
• It is simpler to create hardware than only counts in decimal and uses basic calculation (e.g.
digital clocks, simple calculators)
• Binary coded decimal removes the problem of floating point rounding errors, which makes is
very useful for handling financial transactions.
BINARY CODED DECIMAL
CLOCK DEMONSTRATION PROJECT
BINARY CODED DECIMAL
FINANCIAL SYSTEMS
In binary systems decimals numbers are stored using a floating point representation.
When representing fractions of a whole some numbers cannot be stored accurately using
binary, due to the fractions not fitting perfectly within a binary base 2 system.
This results in a floating point rounding error. In financial systems rounding errors are
unacceptable and must be dealt within. For this reason, binary coded decimal is used instead.
CONVERTING TEXT TO BINARY
Converting text to binary is a simple process. You simply look up the decimal value for the
character in the ASCII table below, and then convert that value from decimal to binary.
ASCII
Pros
• Very easy to read, write and understanding ASCII code, simple for a human
being to memorize each character.
• Small storage and transmission size ( 7 bits for standard ASCII 8bits for
extended ASCII)
Cons
▪ Only works for the English language, limited number of special characters.
UNICODE
It became clear that a system with a much large number of available characters was required
and hence Unicode was invented.
Pros
▪ Millions of different characters available due to the larger number of bits per character ( 16 or
32 bits)
Cons
▪ 2 or 4 times more storage space taken up per letter.
Try it out!
https://www.rapidtables.com/convert/number/ascii-to-binary.html
TRY IT!!
1. Convert these text examples to binary:
a. dog
b. cat
c. Mouse
d. Your name
https://youtu.be/4qH4unVtJkE
ONE’S COMPLIMENT
▪ To get 1's complement of a binary number, simply invert the given number. For
example, 1's complement of binary number 110010 is 001101.
▪ There are various uses of 1’s complement of Binary numbers, mainly in signed
Binary number representation and various arithmetic operations for Binary
numbers, e.g., additions, subtractions, etc.
▪ 1’s complement binary numbers are very useful in signed number representation.
Positive numbers are simply represented as Binary number. There is nothing to do
for positive binary number. But in case of negative binary number representation,
we represent in 1’s complement. If the number is negative, then it is represented
using 1’s complement. First represent the number with positive sign and then take
1’s complement of that number.
TWO’S COMPLIMENT
To get 2's complement of binary number is 1's complement of given number plus 1 to the
least significant bit (LSB).
Example-1 − Find 2’s complement of binary number 10101110.
Simply invert each bit of given binary number, which will be 01010001. Then add 1 to the LSB
of this result.
01010001
+1
01010010