Introduction to mathematics for computer science - learn by practice and share


number base photo
number base photo - day three

Welcome to day three!


I hope you all doing fine and Right. me also. In previous tutorial we have learned that, what is number base, what is decimal and binary number, I we have learned how to convert between binary to decimal number.

Today, I will post some question, and yeah answer too, okay let's start with that.


❓ 1. Describe one way of converting decimal numbers to binary numbers.

Answer: Repeatedly divide the decimal number by 2, carefully noting the remainder each time. The binary number is formed by writing the remainders in reverse order.


❓ 2. What number is the binary system based upon?

Answer: Based on 2. 0 & 1.


❓ 3. How many different digits occur in the binary system?

Answer: 2 different digits occur. they are 0 & 1.


❓ 1. Convert the following decimal numbers to binary numbers: 

(a) 19 (b) 36 (c) 100 (d) 796 (e) 5000.


Answer of (a): 

                          

                          To convert to binary, the decimal number 19 is repeatedly divided by 2.

                                Each time we note the remainder. 

                               The binary number is formed by writing the remainders in reverse order:


                                                                                               Remainder

19 / 2 = 8 r 1                                          1

8 / 2 = 4 r 0                                            0
 
4 / 2 = 2 r 0                                            0
 
2 / 2 = 1 r 0                                            0 

1 / 2 = 0 r 1                                            1
 

Reading the remainders from bottom to top: 1910 = 100112



Answer of (b), (c), (d), (e) can be done by following method of (a). This is your home work!



❓ 2. Convert the following binary numbers to decimal numbers: 

(a) 111 (b) 10101 (c) 111001 (d) 1110001 (e) 11111111.



Answer of (a): 




So,                                   
1112 =  1(22) + 1(21)+ 1(20)

                                                                     = 1*4 + 1*2+ 1*1
                                                                     = 4+ 2+ 1
                                                                     = 7

Answer is 7. Answer of (b), (c), (d), (e) is your homework.


❓ 3. What is the highest decimal number that can be written in binary form using a maximum of:
 (a) two binary digits, (b) three binary digits, (c) four binary digits, (d) five binary digits? 

Can you spot a pattern? (e) Write a formula for the highest decimal number that can be written using N binary digits. 



Answer of (a):      


It seems look a bit hard, but I think if you can read it properly, definitely you'll find it easy!

We already know that binary number based on 2. these number is 0 & 1. so the lower number in binary is 0 & highest number is 1 according to its number base. so, determine the highest decimal form an binary number is very easy. yes, to be more specific, in this question I said that " What is the highest decimal number that can be written in binary form using a maximum of:
 (a) two binary digits", according to our understanding, the highest binary two digit number is 112.

So, answer of the question (a) is:

                                                            112   =  1(21) + 1(20)
         =   1*2 + 1*1
         =   2+1
         =   3

We found that answer is 310 


Your Homework is (b), (c), (d), (e).
 
 
 
                                                                   


Comments

Popular posts from this blog

Kaiser Group Insurance for Small Business - Kaiser Permanente

Machine Learning with AWS - Computer Vision and Its Applications

MIUI 12.6 Android 11 port for Poco M3 download - Well tested ROM