Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 33

INTRODUCTION TO

INFORMATION AND
COMMUNICATION
TECHNOLOGY
Dr Samabia Tehsin

INTRODUCTION TO INFORMATION AND COMMUNICATION TECHNOLOGY 1


BINARY
REPRESENTATION
INTRODUCTION TO INFORMATION AND COMMUNICATION TECHNOLOGY 2
DIGITAL SYSTEMS
◦ They manipulate discrete information (A finite number
of elements)
◦ Example discrete sets
◦ 10 decimal digits, the 26 letters of alphabet
◦ Information is represented in binary form
◦ Examples
◦ Digital telephones, digital television, and digital
cameras
◦ The most commonly used one is DIGITAL
COMPUTERS
Binary Systems 3
HOW DO COMPUTER CIRCUITS MANIPULATE
DATA?
◦ALL computers are electronic, digital devices
◦ Digital devices work with discrete data, such as digits 1 and 0, or like a light
switch – on or off
◦ These 1s and 0s are referred to as binary digits or shortened to bits
◦ It means two-states
◦ 1 and 0
◦ true and false
◦ on and off
◦ A single “on/off”, “true/false”, “1/0” is called a bit
◦ Computers use sequences of bits to digitally represent numbers, letters,
4
punctuation marks, music, pictures, and videos
BIT BASICS
◦ Bit: From Binary digit
◦ Smallest unit of information computer can process
◦ Can have one of two values: 0 or 1
◦ Byte
◦ Collection of 8 bits
◦ Can represent 256
different messages
(256 = 28)

5
BYTE
◦ Computer memory is organized into groups of eight bits
◦ Each eight bit group is called a byte

Binary Systems 6
BITS AS NUMBERS
◦ Denotes all numbers with combinations of 0s and 1s
◦ Decimal numbers automatically converted to binary
◦ Binary number processing hidden from user
Decimal Binary Decimal Binary
0 0000 5 0101
1 0001 6 0110
2 0010 7 0111
3 0011 8 1000
4 0100 9 1001
7
BITS AS CODES

◦ Codes represent each letter, digit, and special character


◦ ASCII: Most widely used
◦ Each character is a unique 8-­bit code
◦ 256 unique codes for 26 letters, 10 digits, special
characters
◦ Unicode: Supports more than 100,000 unique
characters

8
◦ The main difference between Unicode and ASCII is that Unicode
is the IT standard that represents letters of English, Arabic,
Greek (and many more languages), mathematical symbols,
historical scripts, etc whereas ASCII is limited to few characters
such as uppercase and lowercase letters, symbols, and digits(0-
9).
◦ Unicode is also known as Universal Character Set. American
Standard Code for Information Interchange is the full form of
ASCII.
INTRODUCTION TO INFORMATION AND COMMUNICATION TECHNOLOGY 9
WHY COMPUTERS USE BINARY
◦ They can be represented with a transistor that is
relatively easy to fabricate (in silicon)
◦ Millions of them can be put in a tiny chip
◦ Unambiguous signal (Either 1 or 0)
◦ This provides noise immunity

Binary Systems 10
Binary Numbers

◦ A number in a base-r system


x = xn-1xn-2 ... x1x0 . x-1 x-2 ... X-(m-1) x-m
n 1 n2 1 2 m
Value ( x)  xn 1  r  xn  2  r  ...  x0  r  x1  r  x 2  r  ...  x m  r
0

(234.26) 6  2  6 2  3  61  4  60  2  6 1  6  6 2  (94.5)10

1
(45.4)8  4  8  5  8  4  8  (39.5)10
1 0
RADIX NUMBER SYSTEM
◦ Base – 2 (binary numbers)
◦0 1
◦ Base – 8 (octal numbers)
◦0 1 2 3 4 5 6 7
◦ Base – 16 (hexadecimal numbers)
◦0 1 2 3 4 5 6 7 8 9AB C D E F

Binary Systems 15
Radix Operations

◦ The same as for decimal numbers

11001011 11001011 101


+10011101 - 10011101 * 110
101101000 00101110 000
1010
+10100
11110
CONVERSION FROM ONE RADIX TO
ANOTHER
◦ From decimal to binary

Binary Systems 17
Conversion From one radix to another
◦ From decimal to base-r
◦ Separate the number into an integer part and a fraction part
◦ For the integer part
◦ Divide the number and all successive quotients by r
◦ Accumulate the remainders

165
4 0.6875 x 2 = 1 + 0.3750
23
2 0.3750 x 2 = 0 + 0.7500
3
3 0.7500 x 2 = 1 + 0.5000
0
0.5000 x 2 = 1 + 0.0000

(165)10  (324) 7 (0.6875)10  (0.1011) 2


DIFFERENT BASES

Binary Systems 19
CONVERSION FROM ONE RADIX TO
ANOTHER
◦ From binary to octal
◦ Divide into groups of 3 bits
◦ Example
◦ 11001101001000.1011011 = 31510.554
◦ From octal to binary
◦ Replace each octal digit with three bits
◦ Example
◦ 75643.5704 = 111101110100011.101111000100

Binary Systems 20
CONVERSION FROM ONE RADIX TO
ANOTHER
◦ From binary to hexadecimal
◦ Divide into groups of 4 bits
◦ Example
◦ 11001101001000.1011011 = 3348.B6
◦ From hexadecimal to binary
◦ Replace each digit with four bits bits
◦ Example
◦ 7BA3.BC4 = 111101110100011.101111000100
Binary Systems 21
Complements
◦ They are used to simplify the subtraction operation
◦ Two types (for each base-r system)
◦ Diminishing radix complement (r-1 complement)
◦ Radix complement (r complement)

For n-digit number N

(r  1)  N
n r-1 complement

r Nn r complement
9’S AND 10’S COMPLEMENTS
◦ 9’s complement of 674653
◦ 999999-674653 = 325346
◦ 9’s complement of 023421
◦ 999999-023421 = 976578
◦ 10’s complement of 674653
◦ 325346+1 = 325347
◦ 10’s complement of 023421
◦ 976578+1=976579

Binary Systems 23
1’S AND 2’S COMPLEMENTS
◦ 1’s complement of 10111001
◦ 11111111 – 10111001 = 01000110
◦ Simply replace 1’s and 0’s
◦ 1’s complement of 10100010
◦ 01011101
◦ 2’s complement of 10111001
◦ 01000110 + 1 = 01000111
◦ Add 1 to 1’s complement
◦ 2’s complement of 10100010
◦ 01011101 + 1 = 01011110
Binary Systems 24
SUBTRACTION WITH COMPLEMENTS OF
UNSIGNED
◦M – N
◦ Add M to r’s complement of N
◦ Sum = M+(rn – N) = M – N+ rn
◦ If M > N, Sum will have an end carry rn , discard it
◦ If M<N, Sum will not have an end carry and
◦ Sum = rn – (N – M) (r’s complement of N – M)
◦ So M – N = – (r’s complement of Sum)

Binary Systems 25
SUBTRACTION WITH COMPLEMENTS
OF UNSIGNED
65438 - 5623
65438
10’s complement of 05623 +94377
159815
Discard end carry 105 -100000
Answer 59815

Binary Systems 26
SUBTRACTION WITH COMPLEMENTS
OF UNSIGNED
◦ 5623 - 65438
05623
10’s complement of 65438 +34562
40185
There is no end carry =>
-(10’s complement of 40185)
-59815
Binary Systems 27
SUBTRACTION WITH COMPLEMENTS
OF UNSIGNED
◦ 10110010 - 10011111
10110010
2’s complement of 10011111 +01100001
100010011
Discard end carry 2^8 -100000000
Answer 000010011

Binary Systems 28
SUBTRACTION WITH COMPLEMENTS
OF UNSIGNED
◦ 10011111 -10110010
10011111
2’s complement of 10110010 +01001110
11101101
There is no end carry =>
-(2’s complement of 11101101)
Answer = -00010011

Binary Systems 29
SIGNED BINARY NUMBERS
◦ Unsigned representation can be used for positive
integers
◦ How about negative integers?
◦ Everything must be represented in binary numbers
◦ Computers cannot use – or + signs

Binary Systems 30
NEGATIVE BINARY NUMBERS

◦ Three different systems have been used


◦ Signed magnitude
◦ One’s complement
◦ Two’s complement
NOTE: For negative numbers the sign bit is always
1, and for positive numbers it is 0 in these three
systems
Binary Systems 31
SIGNED MAGNITUDE
◦ The leftmost bit is the sign bit (0 is + and 1 is - ) and
the remaining bits hold the absolute magnitude of the
number
◦ Examples
◦ -47 = 1 0 1 0 1 1 1 1
◦ 47 = 0 0 1 0 1 1 1 1
For 8 bits, we can represent the signed integers –128 to +127
How about for N bits?
Binary Systems 32
ONE’S COMPLEMENT
◦ Replace each 1 by 0 and each 0 by 1
◦ Example (-6)
◦ First represent 6 in binary format (00000110)
◦ Then replace (11111001)

Binary Systems 33
TWO’S COMPLEMENT
◦ Find one’s complement
◦ Add 1
◦ Example (-6)
◦ First represent 6 in binary format (00000110)
◦ One’s complement (11111001)
◦ Two’s complement (11111010)

Binary Systems 34
ARITHMETIC ADDITION
◦ Usually represented by 2’s complement
Discard

+5 00000101 -5 11111011
+11 00001011 +11 00001011
+16 00010000 +6 100000110

+5 00000101 -5 11111011
-11 11110101 -11 11110101
-6 11111010 -16 111110000
Binary Systems 35

Discard
CREDITS & ACKNOWLEDGEMENTS
◦ Digital Planet: Tomorrow’s Technology and You, Pearson Education, Inc. publishing as Prentice Hall
◦ Digital Logic Design by Dr. Fenghui Yao, Tennessee State University, Department of Computer Science, Nashville, TN

INTRODUCTION TO INFORMATION AND COMMUNICATION TECHNOLOGY 36

You might also like