syste…  · web viewquick review: number system can be categorized in two systems:-(a)...

49
Sofia Goel | ClassXI Chapter 3 |Number System |Computer Sc | 29/8/2010 Page No 1 Quick review: Number System can be categorized in two systems:- (a) Non-Positional Number System (b) Positional Number System Decimal System has Base 10 and valid digits - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 Binary System has Base 2 and valid digits - 0, 1 Octal System has Base 8 and valid digits - 0, 1, 2, 3, 4, 5, 6, 7 Hexadecimal System has Base 16 and valid digits - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F where A refers to decimal 10, B refers to decimal 11, etc. Decimal number without fractions gets converted to any other number by repeated division method For binary divide by 2 for octal number divide by 8 and for hexadecimal number divide by 16. Decimal numbers with fractions gets converted to any other number Number conversion Without fractions Fractions Decimal to binary ,octal ,hexadecim al Divide by 2 for binary, divide by 8 for octal and divide by 16 for hexadecimal Multiply fractional part by 2 in binary . By 8 for octal and by 16 for hexadecimal Binary to decimal Same applies for Add the weighted value to the decimal number ( base 2) where place holder is 0 to n 2 2 , 2 1 ,2 0 Add the weighted value to the decimal number ( base 2) where fractional placeholder is 2- 1 , 2- 2 ………

Upload: leduong

Post on 01-Feb-2018

243 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: syste…  · Web viewQuick review: Number System can be categorized in two systems:-(a) Non-Positional Number System (b) Positional Number System. Decimal System has Base 10 …

Sofia Goel | ClassXI Chapter 3 |Number System |Computer Sc |29/8/2010 Page No 1

Quick review: Number System can be categorized in two systems:-

(a) Non-Positional Number System(b) Positional Number System

Decimal System has Base 10 and valid digits - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9

Binary System has Base 2 and valid digits - 0, 1 Octal System has Base 8 and valid digits - 0, 1, 2, 3, 4, 5, 6, 7 Hexadecimal System has Base 16 and valid digits - 0, 1, 2, 3, 4, 5, 6,

7, 8, 9, A, B, C, D, E, F where A refers to decimal 10, B refers to decimal 11, etc.

Decimal number without fractions gets converted to any other number by repeated division method For binary divide by 2 for octal number divide by 8 and for hexadecimal number divide by 16.

Decimal numbers with fractions gets converted to any other number

Number conversion Without fractions Fractions Decimal to binary ,octal ,hexadecimal

Divide by 2 for binary, divide by 8 for octal and divide by 16 for hexadecimal

Multiply fractional part by 2 in binary .

By 8 for octal and by 16 for hexadecimal

Binary to decimal

Same applies for octal and hexadecimal

Add the weighted value to the decimal number ( base 2) where place holder is 0 to n

2 2 , 2 1 ,2 0

Base 8 and 16 respectively

Add the weighted value to the decimal number ( base 2) where fractional placeholder is 2-1, 2-2………

Base 8 and 16 respectively

Binary to octal Create a group of 3 bits ,add trailing bits to the left with 0, and assign the corresponding value

Create a group of 3 bits and add trailing bits to the right with 0,assign the corresponding value

Binary to hexadecimal

Create a group of 4 bits ,add trailing bits to the left with 0

Create a group of 4bits and add trailing bits to the right with 0

Page 2: syste…  · Web viewQuick review: Number System can be categorized in two systems:-(a) Non-Positional Number System (b) Positional Number System. Decimal System has Base 10 …

Sofia Goel | ClassXI Chapter 3 |Number System |Computer Sc |29/8/2010 Page No 2

Octal and hexadecimal to binary

Write binary equivalent of each digit towards left. (For octal form group of3bits and for hexadecimal in 4bits)

Write binary equivalent of each digit after decimal point towards right

Octal to hexadecimal

First convert octal to binary then binary to hexadecimal

Same as for integers

Hexadecimal to octal

First convert hexadecimal to binary then binary to octal

Same as for integers

Binary Hex Binary Octal

0000 0 000 00001 1 001 10010 2 010 20011 3 011 30100 4 100 40101 5 101 50110 6 110 60111 7 111 71000 81001 91010 A1011 B1100 C1101 D1110 E1111 F

Multiple Choice Questions :1. Conversion of decimal number 6110 to its binary number equivalent is

a. 1100012 b.1111002

c. 1100112 d. 0011012

e. None of the above2. Conversion of decimal number 9910 to its binary number equivalent is

a. 11000112 b.110011102

Page 3: syste…  · Web viewQuick review: Number System can be categorized in two systems:-(a) Non-Positional Number System (b) Positional Number System. Decimal System has Base 10 …

Sofia Goel | ClassXI Chapter 3 |Number System |Computer Sc |29/8/2010 Page No 3

c. 1111012 d. 111112

e. None of the above3. Conversion of decimal number 7110 to its binary number equivalent is

a. 1100112 b.11100112

c. 01100112 d. 10001112

e. None of the above

4. Conversion of decimal number 8910 to its binary number equivalent is

a. 10110112 b.11001112

c. 10110012 d. 100112

e. None of the above 5. Conversion of decimal number 1310 to its octal number equivalent i

a. 158 b.178

c. 138 d. 118

e. None of the above

6. Conversion of decimal number 4210 to its octal number equivalent is

a. 578 b.428

c. 478 d. 528

e. None of the above

7. Conversion of decimal number 6710 to its octal number equivalent is

a. 1008 b.1038

c. 1098 d. 998

e. None of the above

8. Conversion of an octal number 31378 to its decimal equivalent is

a. 163110 b.163210

c. 153110 d. 193110

e. None of the above

9. Conversion of an octal number 1348 to a binary number is

Page 4: syste…  · Web viewQuick review: Number System can be categorized in two systems:-(a) Non-Positional Number System (b) Positional Number System. Decimal System has Base 10 …

Sofia Goel | ClassXI Chapter 3 |Number System |Computer Sc |29/8/2010 Page No 4

a. 0010110112 b.0011011002

c. 0010111002 d. 1100112

e. None of the above

10. Conversion of an octal number 74328 to a binary number is

a. 11110001101112 b.1111000110102

c. 1100110101112 d. 1111111110002

e. None of the above

11. Conversion of hexadecimal number ID7F16 to a decimal number is

a. 755110 b.877110

c. 555710 d. 778110

e. None of the above

12. Conversion of hexadecimal number 6B216 to its binary number equivalent is

a. 11110001101112 b.0110101100102

c. 01100110011112 d. 111111112

e. None of the above

13. Conversion of binary number 11000112 to an octal number is

a. 1408 b.1438

c. 1478 d. 1498

e. None of the above

14. Conversion of binary number 10100002 to an octal number is

a. 1198 b.1018

c. 1118 d. 1208

e. None of the above

15. Conversion of binary number 1011102 to hexadecimal is

Page 5: syste…  · Web viewQuick review: Number System can be categorized in two systems:-(a) Non-Positional Number System (b) Positional Number System. Decimal System has Base 10 …

Sofia Goel | ClassXI Chapter 3 |Number System |Computer Sc |29/8/2010 Page No 5

a. 358 b.468

c. 568 d. 508

e. None of the above

16. Conversion of binary number 11000112 to hexadecimal is

a. 6316 b.5716

c. 4616 d. 4016

e. None of the above

17. Conversion of a hexadecimal number 4E16 to binary number is

a. 10011012 b.10011102

c. 11011002 d. 1101112

e. None of the above

18. Conversion of a hexadecimal number 3A16 to binary number is

a. 11011012 b.1110102

c. 1001102 d. 1100112

e. None of the above

19. Conversion of a octal number 638 to its decimal number is

a. 5110 b. 6110

c. 5710 d. 5310

e. None of the above

20. Conversion of an octal number 1438 to its decimal number is

a. 9010 b. 97110

c. 9910 d. 10710

e. None of the above

21. Conversion of an octal number 1258 to its decimal number is

Page 6: syste…  · Web viewQuick review: Number System can be categorized in two systems:-(a) Non-Positional Number System (b) Positional Number System. Decimal System has Base 10 …

Sofia Goel | ClassXI Chapter 3 |Number System |Computer Sc |29/8/2010 Page No 6

a. 9010 b. 8510

c. 8710 d. 9910

e. None of the above

22. Conversion of an octal number 1368 to hexadecimal number is

a. 7E16 b. 5E16

c. 5A16 d. 5D16

e. None of the above

23. Conversion of an octal number 1128 to hexadecimal number is

a. 4A16 b. 5A16

c. 1516 d. 2016

e. None of the above

24. Conversion of an octal number 568 hexadecimal number is

a. 2A16 b. 3A16

c. 2E16 d. F16

e. None of the above

25. Conversion of an octal number 208 to its binary number is

a. 1000010 b.1011110

c. 1011016 d. 1111016

e. None of the above

26. Addition of 1101012 and 1011112 is

a. 11001002 b.11010002

Page 7: syste…  · Web viewQuick review: Number System can be categorized in two systems:-(a) Non-Positional Number System (b) Positional Number System. Decimal System has Base 10 …

Sofia Goel | ClassXI Chapter 3 |Number System |Computer Sc |29/8/2010 Page No 7

c. 11101112 d. 1100112

e. None of the above

27. Addition of 1101011012, 1110111012, 0001111112, 1001011012, 1111101112 is

a. 1011010111010 2 b.11110110000102

c. 1000101000101 2 d.010010000000102

e. None of the above

28. Subtraction of 1001011002 from 11101010102 is

a. 10010111102 b.01101000012

c. 11110000012 d. 11110111112

e. None of the above

29. Addition of 102 and 112 is

a. 1002 b. 1012

c. 1112 d. 1102 e. None of the above

30. Addition of 11012 and 10102 is

a. 101112 b. 110002

c. 110112 d. 101112

e. None of the above

Answers:

Page 8: syste…  · Web viewQuick review: Number System can be categorized in two systems:-(a) Non-Positional Number System (b) Positional Number System. Decimal System has Base 10 …

Sofia Goel | ClassXI Chapter 3 |Number System |Computer Sc |29/8/2010 Page No 8

1) a 2) a 3) d 4) c 5) a 6) d 7) b 8) a 9) c 10) b.

11) a 12) b. 13) b. 14) d 15) c 16) a 17) b 18) b 19) a 20) c.

21) b 22) b 23) b 24) c 25) a. 26) a 27) a 28)a 29) b 30) b

Solved Exercises:1. Define the following terms:a. Byte b) unicode

a) Byte: A group of 8 bits is referred to as a byte.

b) Unicode :A symbol encoding system that uses 16 bits to represent of all world languages. It can represent about 65536 symbols. Similar to ASCII, each symbol is assigned a (16-bit) numerical code.

2. What is the importance of binary number system in building computers ?A: A computer can represent information as electrical pulses or

magnetic fields. A computer uses and works with two voltagestates: high or low (to represent one bit of information). As suchit makes sense to use a number system that also just uses twopossible states: 1 or 0 (On or off).

3. Explain why the computer must convert between the decimal andbinary systems? (Why can’t it just store decimal numbers, for example?)

A: The computer cannot and doesn’t store decimal numbers directly.As stated above it can only store and transmit electrical pulses(high or low). As such decimal numbers must be converted into asequence of 1’s and 0’s, which can then easily be translated intohigh or low voltages.

4. How many distinct values can we represent witha) 4 bits b) 5 bits

A: a) 24 =16 b) 25 = 32

5. What is the largest positive number one can represent in 5-bit 2’s complement code?

A: 25-1 -1 = 15

Page 9: syste…  · Web viewQuick review: Number System can be categorized in two systems:-(a) Non-Positional Number System (b) Positional Number System. Decimal System has Base 10 …

Sofia Goel | ClassXI Chapter 3 |Number System |Computer Sc |29/8/2010 Page No 9

6. What is the largest number that can be represented if we use 6bits? Show your work / reasoning.

A: We get the largest number by using all bits (digits). For 6 digits,the number in binary will be 11 1111. In decimal,11 1112 = 32 +16+ 8+4+2+1 = 6310

7. We could use the most significant digit to represent the sign of a number. If it is 1, the number is negative. Otherwise, it is positive.

What problems do we run into if we use this system?A: The problem is that the arithmetic (addition and subtraction)

doesn’t give reasonable results. This can be illustrated with thefollowing example. Suppose we represent 5 and –5 using thisscheme. Then,510 = 0000 01012 and -510 = 1000 01012Now we know that 5 + (-5) = 0 and 010 = 0000 00002But, when we add 0000 01012 and 1000 01012 together, we do notget 010 as expected!

0000 01012+ 1000 01012------------------1000 10102 = -1010

8. What is the general technique for converting a decimal number to binary?   

A: The general technique for converting a decimal number to binary involves repeatedly dividing the decimal number by 2 and then collecting the reminders to form the binary answer. The steps are as follows:

i. Divide the decimal number by 2. ii. Working from right to left, use the remainder as the next digit of

your binary answer. iii. Use the quotient from your previous division to repeat steps 1

and 2 until you get zero for a quotient.

9. Which digit is the least significant digit of a number? Which digit is the most significant digit of a number?

Page 10: syste…  · Web viewQuick review: Number System can be categorized in two systems:-(a) Non-Positional Number System (b) Positional Number System. Decimal System has Base 10 …

Sofia Goel | ClassXI Chapter 3 |Number System |Computer Sc |29/8/2010 Page No 10

A: The rightmost digit is the least significant digit of a number, and the leftmost digit is the most significant digit of a number. For example, in the number 2045.9610 the least significant digit is 6 and the most significant digit is 2.

10. When converting a decimal number to binary with repeated division, does the remainder from your first division represent the least significant digit of your answer or the most significant digit of your answer?  

A: The remainder from your first division represents the least significant digit of your binary answer. When you convert integers from decimal to binary, you work from the least significant digit to the most significant digit (i.e. right to left).

11.Convert the decimal numbers 0 - 15 to binary and list the answers in a table beside their decimal equivalents. You should become familiar with these numbers so that you do not need to use repeated division when you need to write the binary.   

A: The table below lists the the numbers 0 - 15 in binary and decimal.

B D B D B D B D0000000100100011

0123

0100010101100111

4567

1000100110101011

891011

1100110111101111

12131415

12. Come up with a scheme that will allow us to represent fractions inbinary (e.g. 2.5, 3.75)

A: Method 1: Use half of the bits to represent the number left of the decimal point and the other half to represent the fractional part.Example: (Using 8 bits in total; 4 right most for fractional part)8.2 = 1000 0010Method 2: For binary numbers, the position of the digit corresponds to a power of 2. So, we could use negative powers of 2 to represent the fractional parts. Just as above, only some of the bits will be used for the fractional part.Example: (Using 8 bits in total; 4 right most for fractional part)1011.0111 = 23 + 21 + 20 + 2-2 + 2-3 + 2-4= 8 + 2 + 1 + 0.25 + 0.125 + 0.0625

Page 11: syste…  · Web viewQuick review: Number System can be categorized in two systems:-(a) Non-Positional Number System (b) Positional Number System. Decimal System has Base 10 …

Sofia Goel | ClassXI Chapter 3 |Number System |Computer Sc |29/8/2010 Page No 11

= 11.4375When converting from decimal to binary, a fraction will have to berepresented as sum of negative powers of 2 (1/2, 1/4, 1/8, 1/16,…).Method3: Write the number in a modified scientific form such that the digit to the left of the decimal point is always 0 i.e. 34.619 becomes 0.34619 x 102.Now we could use some of the bits to represent the number right of the decimal point and rest of the digits to represent the exponent of 10.

13. Convert the following signed numbers from decimal to binary. You may only use 8 bits.

A:

Page 12: syste…  · Web viewQuick review: Number System can be categorized in two systems:-(a) Non-Positional Number System (b) Positional Number System. Decimal System has Base 10 …

1 1 0 1 1

Sofia Goel | ClassXI Chapter 3 |Number System |Computer Sc |29/8/2010 Page No 12

14. Convert the following decimal numbers to binary:a) 27 b) 75 c)164 d) 255 e) 94

A: a) 27

Thus (27)10 = (11011)2

b) 75 A:

thus (75)10 = (1001011)2

c) 164A:

2 27 Remainder

2 13 1 (LSB)

2 6 12 3 0 2 1 1

0 1(MSB)

2 75 Remainder

2 37 1 (LSB)2 18 12 9 0 2 4 12 2 02 1 0

0 1(MSB)

2 164 Remainder

2 82 0 (LSB)2 41 02 20 1 2 10 02 5 02 2 12 1 0

0 1(MSB)

Page 13: syste…  · Web viewQuick review: Number System can be categorized in two systems:-(a) Non-Positional Number System (b) Positional Number System. Decimal System has Base 10 …

Sofia Goel | ClassXI Chapter 3 |Number System |Computer Sc |29/8/2010 Page No 13

Thus (164)10 = (10100100)2

d) 255 A:

Thus (255)10 = (11111111)2

e) 94

2 255 Remainder

2 127 1 (LSB)2 63 12 31 1 2 15 12 7 12 3 12 1 1

0 1(MSB)

2 94 Remainder

2 47 0 (LSB)2 23 12 11 1 2 5 12 2 12 1 0

0 1(MSB)

Page 14: syste…  · Web viewQuick review: Number System can be categorized in two systems:-(a) Non-Positional Number System (b) Positional Number System. Decimal System has Base 10 …

Sofia Goel | ClassXI Chapter 3 |Number System |Computer Sc |29/8/2010 Page No 14

Thus (94)10 = (1011110)2

15.Convert the following binary numbers to decimal:

a) 1 b) 1010 c)11001 d) 10000

A: a) 1x20 = (1)10

b) 1010 = 1x23 + 0x22 + 1x21 + 0x20

= 8 + 0 + 2+ 0 = (10)10

c) 11001 = 1x24 + 1x23 + 0x22 + 0x21 + 1x20

= 16+ 8 +1 = (25 )10

d) 10000 = 1x24 + 0x23 + 0x22 + 0x21 + 0x20

= 16+ 0 +0 +0 +0= (16 )10

16. Convert the following decimal fractions into binary .a. 68.5625 b. 43.625

A: a. 68.5625First solve the integer part by repeated division method and then solve the fraction part by multiplication method .

Solving 68 2 68 Remaind

er2 34 0 (LSB)2 17 02 8 1 2 4 02 2 02 1 0

0 1(MSB)

Page 15: syste…  · Web viewQuick review: Number System can be categorized in two systems:-(a) Non-Positional Number System (b) Positional Number System. Decimal System has Base 10 …

Sofia Goel | ClassXI Chapter 3 |Number System |Computer Sc |29/8/2010 Page No 15

it is 1000100 Now solving 0.5625

Integer part 0.5625 x 2 = 1.125 10.125 x 2 = 0.25 00.25 x 2 = 0.50 00.50 x 2 = 1.00 1

it is 1001

Adding both the values :(68.5625)10 = (1000100.1001)2

b) 43.625

A: Solving 43

it is 101011 Now solving 0.625

Integer part 0.625 x 2 = 1.25 10.25 x 2 = 0.50 00.50 x 2 = 1.00 1

it is 101

2 43 Remainder

2 21 1 (LSB)2 10 12 5 0 2 2 12 1 0

0 1(MSB)

Page 16: syste…  · Web viewQuick review: Number System can be categorized in two systems:-(a) Non-Positional Number System (b) Positional Number System. Decimal System has Base 10 …

Sofia Goel | ClassXI Chapter 3 |Number System |Computer Sc |29/8/2010 Page No 16

Adding both the values :(43.625)10 = (101011.101)2

17. Convert the following binary fractions into decimal a) 00111011.01 b) 1110.001

A: 111011.01 is represented as = 1x25 + 1x24 + 1x23 + 0x22 + 1x21 +1x20 + 0x2-1 + 1x2-2

= 32+ 16+ 8 + 2+1+ 0.25 = (59.25)10

b) 1110.001 A: = 1x23 + 1x22 + 1x21 +0x20 + 0x2-1 + 0x2-2 + 1x2-3

= 8+ 4+ 2+ 0.125 = (14.125)10

18.Express the hexadecimal unsigned integer 5C with the equivalent

decimal number

A :To express the hexadecimal unsigned integer 5C with the equivalent decimal number, we must convert the hexadecimal digits to decimal numbers as well as expand:  10, B 11, C 12, D 13, E 14, F 15. Thus,

5C = 5(161) + 12(160)

   = 5 (16) + 12 (1)

   = 92

19. Convert 3724 8 into binary number

A: 3724 8 (Write 3 bit binary form for every digit)

= 3 7 2 4

011 111 010 100

= 11111 0101 2

Page 17: syste…  · Web viewQuick review: Number System can be categorized in two systems:-(a) Non-Positional Number System (b) Positional Number System. Decimal System has Base 10 …

Sofia Goel | ClassXI Chapter 3 |Number System |Computer Sc |29/8/2010 Page No 17

20. Convert (100100101011)2 to octal A: 1) Write down your binary number: 100100101011

2) Divide your binary number into groups of 3 bits

(if you have an amount of bits that is not evenly divisible by 3 you add 0 bits onto the left side.) 100 100 101 011

3) Convert each group into a octal digit using this formula:

100, 100 ,101, 0114 4 5 3

Thus 100100101011(2) = 4453(8)

21. convert (632)8 to decimalA: = (6 x 82) + (3 x 81) + (2 x 80)

= (6 x 64) + (3 x 8) + (2 x 1)= 384 + 24 + 2= (410)10

22. convert (177)10 to octalA:

= 2 6 123. convert (F4C)16 to decimal

= (F x 162) + (4 x 161) + (C x 160)= (15 x 256) + (4 x 16) + (12 x 1)

= (61516)10

24. Convert the following numbers from decimal to hexadecimal(use any methods). Show all steps.

a. (4768)10 to hex.A

8 177 Remainder

8 22 1 (LSB)8 2 6

2(MSB)

Page 18: syste…  · Web viewQuick review: Number System can be categorized in two systems:-(a) Non-Positional Number System (b) Positional Number System. Decimal System has Base 10 …

Sofia Goel | ClassXI Chapter 3 |Number System |Computer Sc |29/8/2010 Page No 18

Hence (4768)10 = 1 2 A 0

b) (159)10

A:

Hence (159)10 = 9F16

c) 215

A

Hence (215)10 = D716

25. Convert the following numbers from binary to hexadecimal.a) 0111 11012A: 01112 = 7

11012 = 13 (D)

Hence 0111 11012 = 7D16b) 1011 01012A: 10112 = 1110 (B)

01012 = 5Hence 1011 01012 = B5

16 4768 Remainder

16 298 0 (LSB)16 18 10

(10=A)16 1 2

0 1(MSB)

16 159 Remainder

16 9 15(15 =F)9

16 215 Remainder

16 13 713 ( 13=D)

Page 19: syste…  · Web viewQuick review: Number System can be categorized in two systems:-(a) Non-Positional Number System (b) Positional Number System. Decimal System has Base 10 …

Sofia Goel | ClassXI Chapter 3 |Number System |Computer Sc |29/8/2010 Page No 19

26. Convert (6438)8 to base 10.A: 6438 = 6 * 82 + 4 * 81 + 3 * 80

= 6 * 64 + 4 * 8 + 3 * 1= 384 + 32 + 3= 419 in base 10

27. Convert hexadecimal (base-16) 1EA to base 10.Here we know what the letters A through F in base 16 represent. A represents 10,B represents 11, C is 12, D is 13, E is 14 and F is 15. With that in mind, we

have1EA16 = 1 * 162 + 14 * 161 + 10 * 160= 1 * 256 + 14 * 16 + 10 * 1= 256 + 224 + 10= 490 in base 10

28. Convert hexadecimal F8 to binary .

A: To convert hexadecimal F8 to binary, write down the binary for F first, then the binary for 8.  

F    81111

   1000

Hence F8 = 11111000.  29. Convert hex number 1 A to binary

A Convert hex number 1A to binary.  

1    A0001

   1010

Hence 1A = 0001 1010

30. Convert the following from 2’s complement to Decimal 1010A: This is a negative number as the most significant bit is 1. Find out its positive

counter by flipping all bits and then adding 1.0101 + 1 = 0110= 0 x 23 + 1 x 22 + 1 x 21 + 0 x 20= 4 + 2 = 6Hence the number is -6.

Page 20: syste…  · Web viewQuick review: Number System can be categorized in two systems:-(a) Non-Positional Number System (b) Positional Number System. Decimal System has Base 10 …

Sofia Goel | ClassXI Chapter 3 |Number System |Computer Sc |29/8/2010 Page No 20

31. Convert the following numbers to their binary equivalents.   a. 2710 b. 3310 c. 5410 d. 4710 e. 7810

A The decimal and binary equivalents are listed below.

a. 2710  =  110112 b. 3310  =  1000012 c. 5410  =  1101102 d. 4710  =  1011112 e. 7810  =  10011102

32. Convert the following numbers to their binary equivalents.   a. 13010 b. 20010 c. 54910 d. 30410 e. 101010

A: The decimal and binary equivalents are listed below.

a. 13010  =  100000102 b. 20010  =  110010002 c. 54910  =  10001001012 d. 30410  =  1001100002 e. 101010  =  11111100102

33. Convert the following numbers from decimal to binary.Assume we are using 8 bits to represent signed numbers. Show allsteps.[Use 2’s complement in both cases.]

a) -104 b) -49 A: 104 = 64 + 32 + 8

Page 21: syste…  · Web viewQuick review: Number System can be categorized in two systems:-(a) Non-Positional Number System (b) Positional Number System. Decimal System has Base 10 …

Sofia Goel | ClassXI Chapter 3 |Number System |Computer Sc |29/8/2010 Page No 21

= 26+25+23

= 0110 100021’s Complement: 1001 01112 +0000 000122’s Complement: 1001 10002Hence –104 = 1001 10002

b) -4949 = 32 + 16 + 1= 25+24+20

= 0011 000121’s Complement: 1100 11102

+0000 000122’s Complement: 1100 11112Hence –49 = 1100 11112

34. Briefly describe the ASCII system and explain how it works(ie. How is it used to represent data).

A: The ASCII system was devised in 1960s. In this system 128 symbols including the alphabet letters, digits, and punctuation marks are assigned a unique decimal code from 0 to 127. As such these symbols can be represented as a sequence of 7 bits on the computer.

35. Give the decimal equivalent of the following symbols (characters) in ASCII?

A: M = 65+12 = 77 d = 97+3 = 100 7 = 48+7 = 55(13th letter)

36. Explain how you did the conversion in Question 32A: M is the 12th letter after ‘A’ so add 12 to the ASCII code for A. Similarly,

d is the 3rd letter after a so add 3 to ASCII code for a. ASCII code for 48 is 0 so add 6 to it to get the code for 7.

37. Use ASCII conversion to decode the following message frombinary to text. Show all your steps and explanations. 0100 10002 0110 10012

A: 0100 10002 = 64 + 8 = 65 + 7 = ‘H’0110 10012 = 64 + 32+8+1 = 105 = 97 + 8 = ‘i’Decoded message = Hi

38. Represent the word “ COMPUTER “ in ASCII code assuming odd parity is being followed for transmission of strings from one device to another .

Page 22: syste…  · Web viewQuick review: Number System can be categorized in two systems:-(a) Non-Positional Number System (b) Positional Number System. Decimal System has Base 10 …

Sofia Goel | ClassXI Chapter 3 |Number System |Computer Sc |29/8/2010 Page No 22

A To Convert the string into ASCII refer to the table provided for ASCII codes. mapping the various characters with the ASCII code the following representation is given below:

According to that

Character Parity Bit ASCII codeC 0 1000011O 0 1001111M 1 1001101P 1 1010000U 1 1010101T 0 1010100E 0 1000101R 0 1010010

39. . Add the following unsigned binary numbersa) 1110 + 111 b) 11011 + 11011

A: a) 1110 011110101

b) 11011 11011110110

40. Fill in the blanks : a.) Convert 110111.1101 binary b.) 10010101.111 binary

decimal _________________ decimal __________________

c.) Convert 11000011.01 binary d.) 11001010.001 binary

decimal _________________ decimal __________________

Page 23: syste…  · Web viewQuick review: Number System can be categorized in two systems:-(a) Non-Positional Number System (b) Positional Number System. Decimal System has Base 10 …

Sofia Goel | ClassXI Chapter 3 |Number System |Computer Sc |29/8/2010 Page No 23

e) Convert 38.4 decimal f) 252.33 decimal

binary _________________ binary ___________________

A: a) Convert 110111.1101 binary b) 10010101.111 binary

decimal 55.8125 decimal 149.875

c) Convert 11000011.01 binary d) 11001010.001 binary

decimal 195.25 decimal 202.125

e) Convert 38.4 decimal f) 252.33 decimal

binary 100110.0110011 binary 11111100.010101

41. Equate the following octal numbers to base 10 a. (5467)8 =____________b. (6345)8 =___________c. (76534)8 =___________

A: a) 2871b) 3301c) 32092

42. . Using an 8 bit word length, store the following decimal values as Sign Magnitude and 2's Complement:

Sign Magnitude 2's Complement

1) -94 ________________ ________________

2) +110 ________________ ________________

Page 24: syste…  · Web viewQuick review: Number System can be categorized in two systems:-(a) Non-Positional Number System (b) Positional Number System. Decimal System has Base 10 …

Sofia Goel | ClassXI Chapter 3 |Number System |Computer Sc |29/8/2010 Page No 24

3) -23 ________________ ________________

4) +49 ________________ ________________

Using a 10 bit word length store following decimal values as Sign Magnitude and 2's Complement:

Sign Magnitude 2's Complement

5) +278 ________________ ________________

6) -190 ________________ ________________

7) -2 ________________ ________________

8) +87 ________________ ________________

Convert following binary values to decimal assuming they are stored as Sign Magnitude & then as 2's Complement:

Sign Magnitude 2's Complement

9) 1011 1011 ________________ ________________

10) 0011 1101 ________________ ________________

11) 1110 1101 ________________ ________________

12) 0101 1000 ________________ ________________

13) 0110 1101 0111 ________________ ________________

14) 1011 0110 1101 ________________ ________________

15) 0001 0110 1010 ________________ ________________

16) 1111 1101 1011 ________________ ________________

Page 25: syste…  · Web viewQuick review: Number System can be categorized in two systems:-(a) Non-Positional Number System (b) Positional Number System. Decimal System has Base 10 …

Sofia Goel | ClassXI Chapter 3 |Number System |Computer Sc |29/8/2010 Page No 25

A: Sign Magnitude 2's Complement

1. 1101 1110 1010 0010

2. 0110 1110 0110 1110

3. 1001 0111 1110 1001

4. 0011 0001 0011 0001

5. 01000 10110 01000 10110

6. 10101 11110 11010 00010

7. 10000 00010 11111 11110

8. 00010 10111 00010 10111

9. -59 -69

10. +61 +61

11. -109 -19

12. +88 +88

13. +1751 +1751

14. -877 -1171

15. +362 +362

16. -2011 -37

43. Convert the following text into binary using ASCII. Show all your work (for each character).Base 16

A:

Page 26: syste…  · Web viewQuick review: Number System can be categorized in two systems:-(a) Non-Positional Number System (b) Positional Number System. Decimal System has Base 10 …

Sofia Goel | ClassXI Chapter 3 |Number System |Computer Sc |29/8/2010 Page No 26

B = 66 = 64 + 2 = 0100 00102 a = 97 = 64 + 32 + 1 = 0110 00012s = 115 = 64 + 32 + 16 + 2 + 1 = 0111 00112e = 101 = 64 + 32 + 4 + 1 = 0110 01012= 32 = 0010 000021 = 49 = 32 + 16 + 1 = 0011 00012 (the character ‘1’ = 16)6 = 54 = 32 + 16 + 4 + 2 = 0011 01102SoBase 16text =0100 00102 0110 00012 0111 00112 0110 01012 0010 00002 0011 00012

11 02

44. Convert the following code from decimal to the equivalent characterusing ASCII. Show your work / reasoning. 11110

A: 11110= 64 + 32 + 8 + 4 + 2 + 1= 96 + 1596 + 1 is the first letter of the alphabet (i.e. a)… so 96 + 15 is the 15th letter of the alphabet.11110 in ASCII is o

Very Short questions:1. Convert the following decimal into binary

a. 568.1875 ____________________b. 6143.3175 _______________________c. 35________________________d. 76__________________e. 109________________________f.111_____________________

2. Convert the following binary into decimal

a. 100111011.01 _________________ b. 11001110.1001 __________________c. 00111111.1111 ___________________d. 001000100101.1110 __________________e. 11111000011.01 ___________________

Page 27: syste…  · Web viewQuick review: Number System can be categorized in two systems:-(a) Non-Positional Number System (b) Positional Number System. Decimal System has Base 10 …

Sofia Goel | ClassXI Chapter 3 |Number System |Computer Sc |29/8/2010 Page No 27

f. 1000110111110.001 __________________

3. Convert the following decimal into hexadecimal.a. 4096 __________b. 314 _____________ c. 67 ____________ d. 56 _______________e. 89______________f. 12222__________________

4. Convert the following hexadecimal numbers in decimal notation.a. E2_____________________b. 987________________________c. FFF_________________________d. A4_________________________e. CDD3_________________________f. 4E8_________________________

5. Convert the following binary numbers into hexadecimal a. (0110 1100 1001 0001)2 = ___________________b. (0011 1010 1111 1110)2 = ___________________c. (1010 1101 1011 1011)2 = ___________________d. (0000 0000 1111 1111)2 = ____________________e. (1010 0101 1110 0011)2 = ___________________f. (0110 0111 0010 0000)2 = ____________________g. (0110 1001)2 = _____________________________h. (1010 0111)2 = _____________________________

6. Convert the following octal numbers to their decimal equivalent:i. 36

ii. 426iii. 108iv. 17v. 117

7. Find the octal equivalent of the following binary numbers :i. 101110

ii. 1000100iii. 111111iv. 1000001v. 110000000100

Page 28: syste…  · Web viewQuick review: Number System can be categorized in two systems:-(a) Non-Positional Number System (b) Positional Number System. Decimal System has Base 10 …

Sofia Goel | ClassXI Chapter 3 |Number System |Computer Sc |29/8/2010 Page No 28

8. Convert the following octal numbers to their equivalent binary numbersi. 23

ii. 123iii. 46iv. 89v. 34

9. Convert the following decimal number into their octal and hexadecimal equivalent.

i. 34ii. 156iii. 34.78iv. 23.8999v. 12.89

10. In the following problems, each bit pattern represents a value stored in

two's complement notation. Perform each addition, and show the result in two's complement. Check your answers by translating each problem into decimal notation.

a. 0101 b. 0011 c. 0101 d. 1110 e. 1010

+0010 +0001 +1010 +0011 +1110

11. Solve each of the following problems in two's complement notation. Are

any of the results incorrect due to overflow?

a. 0101 b. 0101 c. 1010 d. 0010 e. 0101

+0011 +0110 +1111 +0101 +1001

12. Perform the following binary addition exercises: a. 1 1 0 1 1 b. 1 0 0 0 1 1 c. 1 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 1

13. Find the 1’s and 2’s compliment of the following numbers :i. 65

Page 29: syste…  · Web viewQuick review: Number System can be categorized in two systems:-(a) Non-Positional Number System (b) Positional Number System. Decimal System has Base 10 …

Sofia Goel | ClassXI Chapter 3 |Number System |Computer Sc |29/8/2010 Page No 29

ii. 45iii. 92iv. 101v. 34

14. Find 2’s compliment of the following numbers :i. -89

ii. -67iii. -45iv. -13v. -19

15. Which of the following are valid hexadecimal numbers?a. BAD b. DEAD c. CABBAGE d. ABBAe. 127

Short Questions:

1. Convert the following binary numbers to decimal:

  a. 1101

  b. 1

  c. 101

  d. 110

  e. 10110

Page 30: syste…  · Web viewQuick review: Number System can be categorized in two systems:-(a) Non-Positional Number System (b) Positional Number System. Decimal System has Base 10 …

Sofia Goel | ClassXI Chapter 3 |Number System |Computer Sc |29/8/2010 Page No 30

  f. 0010110

  g. 1101111

  h. 11101110111

2. Convert the following decimal numbers to binary:

  a. 123

  b. 242

  c. 17

  d. 125

  e. 10001

  f.  99

  g. 214

  h. 78

3. Convert the following binary numbers to hexadecimal (base-16):

  a. 0111

  b. 1101

  c. 1011011

  d. 11101100

  e. 100101101

  f. 0101101011110000

  g. 00000000000000000001

Page 31: syste…  · Web viewQuick review: Number System can be categorized in two systems:-(a) Non-Positional Number System (b) Positional Number System. Decimal System has Base 10 …

Sofia Goel | ClassXI Chapter 3 |Number System |Computer Sc |29/8/2010 Page No 31

  h. 11001010111001101011010011

4. Convert the following hexadecimal numbers to binary:

  a. DEAD

  b. AF-05-12-57

  c. 00-00-0C-9F-F2-A9

  d. 00-00-5E-00-00-00

  e. 123456789ABCDEF

  f. F0E1D2C3B4A59687

  g. B0C

  h. 1000

5. Convert the following hexadecimal numbers to decimal:

  a. AA

  b. 123F

  c. FEDCBA

  d. D0-BE-D0

  e. B8C

  f. FF-FF-FF-FA

  g. 10

Page 32: syste…  · Web viewQuick review: Number System can be categorized in two systems:-(a) Non-Positional Number System (b) Positional Number System. Decimal System has Base 10 …

Sofia Goel | ClassXI Chapter 3 |Number System |Computer Sc |29/8/2010 Page No 32

6. Convert the following decimal numbers to hexadecimal:

  a. 9

  b. 32

  c. 73

  d. 255

  e. 1,025

  f. 4,099

  g. 65536

  h. 1,048,575

7. Convert the following octal (base-8) numbers to decimal:

  a. 4

  b. 10

  c. 777

  d. 05726

  e. 183242

8. Convert the following decimal numbers to octal:

  a. 5

  b. 9

  c. 625

Page 33: syste…  · Web viewQuick review: Number System can be categorized in two systems:-(a) Non-Positional Number System (b) Positional Number System. Decimal System has Base 10 …

Sofia Goel | ClassXI Chapter 3 |Number System |Computer Sc |29/8/2010 Page No 33

  d. 1,024

  e. 32,767

9. Convert the following octal numbers to binary:

  a. 107

  b. 2746

  c. 000000001

  d. 66542

  e. 76543210

10. Convert the following binary numbers to octal:

  a. 110

  b. 011101

  c. 010101011

  d. 1111011101101

  e. 111110101100011010001

11. Convert the following octal numbers to hexadecimal:

  a. 6

  b. 12

  c. 367

  d. 5555

Page 34: syste…  · Web viewQuick review: Number System can be categorized in two systems:-(a) Non-Positional Number System (b) Positional Number System. Decimal System has Base 10 …

Sofia Goel | ClassXI Chapter 3 |Number System |Computer Sc |29/8/2010 Page No 34

  e. 123456

12. Convert the following hexadecimal numbers to octal:

  a. 2

  b. 8

  c. 10

  d. FE

  e. 2A4F2D

13. Convert the following binary numbers to decimal :

  a. 0.1

  b. 1.11

  c. 101.01101

  d. 100101.11101

  e. 11101111.10000001

14. Convert the following decimal numbers to binary :

  a. 0.5

  b. 1.0625

  c. 7.7500

  d. 163.2

  e. 3.141592654

Page 35: syste…  · Web viewQuick review: Number System can be categorized in two systems:-(a) Non-Positional Number System (b) Positional Number System. Decimal System has Base 10 …

Sofia Goel | ClassXI Chapter 3 |Number System |Computer Sc |29/8/2010 Page No 35

Long Questions:1. Explain the ways of representing negative integers in binary?2. What do you understand by positional number system.3. What are the ways of converting decimal number into binary ,octal and

hexadecimal.4. What do you understand by the term sign and magnitude.5. What are the three things in representing floating point numbers in binary

form. Give an example.6. What is the advantage of 2 ‘s compliment over 1’s compliment .7. How will you determine parity check for ASCII codes.8. Write the steps for converting hexadecimal number to octal.9. Write the steps for converting decimal number to binary using direct

method.10. What is repeated division method .Write down the steps for the same. 11. What is the importance of hexadecimal presentation of number in

designing chips .12. What do you understand by computer codes?13. Write short notes on ASCII ,ISCII ,Unicode .14. Convert the following decimal numbers to its binary equivalent.

a) 25555.654b) 45.662c) 1.567d) 3.4562e) 2.24

15. Convert the following binary numbers to its decimal equivalent.a) 100.1000b) 10101.1000c) 1111.001d) 10.101e) 11.001

16. Convert the following octal numbers to its decimal equivalent.a) 123.87b) 34.78c) 23.56

Page 36: syste…  · Web viewQuick review: Number System can be categorized in two systems:-(a) Non-Positional Number System (b) Positional Number System. Decimal System has Base 10 …

Sofia Goel | ClassXI Chapter 3 |Number System |Computer Sc |29/8/2010 Page No 36

d) 12.66 e) 10.10

17. Convert the following decimal numbers to its octal equivalent.a) 100.1001b) 10101.101c) 1111.0011d) 10.1011e) 11.0011

18. Convert the following decimal numbers to its hexadecimal equivalenta) 167.100b) 101012.13c) 13.17d) 1617.19e) 18.13

19. Convert the following hexadecimal numbers to its binary equivalenta) 2DC.Fb) 3E.Dc) 4AA.Bd) 5C.De) 1A.B

20. Convert the following binary numbers to its hexadecimal equivalent.a) 100.1001001b) 10101.101001c) 1111.001100d) 10.10110001e) 11.00110001

JITNumber Systems Exercise1. Convert the following decimal numbers to binary:

f) 14 ______________________g) 189 ______________________h) 257 ______________________i) 472 ______________________

Page 37: syste…  · Web viewQuick review: Number System can be categorized in two systems:-(a) Non-Positional Number System (b) Positional Number System. Decimal System has Base 10 …

Sofia Goel | ClassXI Chapter 3 |Number System |Computer Sc |29/8/2010 Page No 37

21. Convert the following decimal numbers to hex:a) 14 ______________________b) 189 ______________________c) 257 ______________________d) 472 ______________________

3. Convert the following hex numbers to decimal:a) 0x37 ______________________b) 0xAB ______________________c) 0x0147 ______________________d) 0x2AE1 ______________________

4. Convert the following hex numbers to binary:a) 0x37 ______________________b) 0xAB ______________________c) 0x0147 ______________________d) 0x2AE1 ______________________

5. Convert the following binary numbers to hex:a) 0010 1101 ______________________b) 1010 1010 ______________________c) 1110 0011 ______________________d) 0010 1001 1011 0101 ______________________

6. Convert the following binary numbers to decimal:a) 0010 1101 ______________________b) 1010 1010 ______________________c) 1110 0011 ______________________d) 0010 1001 1011 0101 ______________________