Advance calculator only valid for unsigned int calculation











UNSIGNED INT CASE DECIMAL ➡️ BINARY

This conversion does not mean anything for us as a programmer but in reality computer understand only 1 means on or 0 means off and everything is like our data any mathematical operation like addition and subtraction are done through this form.System first alerts some memory (bits) space for saving perticular variable or number and then each bit have different position value .visualize the picture properly 

conversion of decimal-binary or binary-decimal


 But for our faster calculation of bigger number this method of position value adding is not possible so we use a different method of "reminder by 2"(which is used in above calculator program) 

Example: 
Convert 13 to binary number
  1. take reminemder of 13/2( IE. 1) andsave 13/2 =6 (take only integer)
  2.  take reminemder of 6/2( IE. 0) and save 6/2 =3 (take only integer) 
  3.  take reminemder of 3/2( IE. 1) and save 3/2 =1 (take only integer) 
  4.  take reminemder of 1/2( IE. 1) and save 1/2 =0 (take only integer)  
and the reminders obtained is 1011(in series) then just flip the reminders I. e. 1101 you will get your answer.

remember complete these steps up-to you get saved no. as 0

UNSIGNED INT CASE BINARY ➡️ DECIMAL

For conversion of binary to decimal we use the method already shown in the previous image as it does not involve any complications so you will easily get your answer. 

Example: 
convert 1001 to decimal 

 answer is equal to 1*2³+0*2²+0*2¹+1*2^0=9(ans)