Beruflich Dokumente
Kultur Dokumente
• Test instruments
(open) 0 or 1 (closed)
base of 2 or radix of 2
0x 22 + (8)
1x 23 + (0)
0x 24 + (32)
1x 25 = 43
Lecturer: Ben Horan SEE103: Electronics March 11, 2015
Binary Number Systems cont.
• When a binary number is written down, the right
hand bit is called the least significant bit (LSB)
and the left most bit is called the most significant
bit (MSB).
• To indicate the number system in use the base is
often written as a subscript.
Thus 1010112 = 4310
• This is to avoid ambiguity
eg. 3 = 11 should be written as 310 = 112
• Process
• To convert a decimal integer to its binary
equivalent, progressively divide the decimal
number by 2, noting the remainder.
• The remainder is taken in reverse order to form
the binary number.
• Process
• To convert a decimal fraction to its binary
equivalent, progressively multiply the fraction by
2, removing and noting the carries.
• The carries taken in forward order form the
binary equivalent.
– Binary: (n digits) = 2n – 1
For Example: highest 3 digit word: 23 -1 = 7
= 3 + 56 + 192 = 25110
Lecturer: Ben Horan SEE103: Electronics March 11, 2015
Octal Number Systems
• For example: convert the octal number 373 to
decimal:
3738 = (3 × 8 ) + (7 × 8 ) + (3 × 8 )
2 1 0
= 192 + 56 + 3 = 25110
25.68 = (2 × 81 ) + (5 × 80 ) + (6 × 8−1 )
= 16 + 5 + 0.75 = 21.7510
1*81 + 7*80
1510
001 111 = 001111 2
25 24 23 22 21 20
Lecturer: Ben Horan SEE103: Electronics March 11, 2015
Octal Number Systems cont.
• Converting back and forth between octal and
binary is easy!
Just convert each octal digit to its binary equivalent:
Octal digit: 0 1 2 3 4 5 6 7
Binary equivalent: 000 001 010 011 100 101 110 111
011010
3 2 = 328
Add leading zeros to complete the last group
Lecturer: Ben Horan SEE103: Electronics March 11, 2015
Hexadecimal Systems
• The Hexadecimal system is a number system
with a base or radix of 16.
• In order to use 16 distinct symbols hexadecimal
uses 0 to 9 plus the letters A through to F.
Solution: 1C9
1*161 + 15*160
27 26 25 24 23 22 21 20
Lecturer: Ben Horan SEE103: Electronics March 11, 2015
Why Use Octal or Hex?
• Computers and digital systems deal with binary
data.
• In a computer it is common to have strings as
long as 64 bits.
• They often represent other information, in
addition to numbers.
• It is often hard to us work with binary numbers.
• When dealing with large numbers of bits, it is
often easier and less error prone to work in octal
or hexadecimal.
Lecturer: Ben Horan SEE103: Electronics March 11, 2015
Why Use Octal or Hex?
• Octal and hexadecimal is a human-friendly way
of represent binary numbers, strings of bits.
• Although it would seem logical to work with
decimal (base 10) octal and hexadecimal have
the advantage of very simple conversion to
binary
• This is because hexadecimal (and octal) both
map to a whole number of bits, (4 bits and 3 bits
respectively)
=12577810
3 6 5 5 2 2
= 3655228
0001=1 14 11 5 2
1 E B 5 2
=1EB5216