Skip to content

ChitrakCDB/Number-system-conversion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Number-system-conversion

In this project you will find

  1. binary to hexadecimal,decimal and octal conversion.
  2. decimal to binary,hexadecimal and octal conversion.
  3. octal to decimal,hexadecimal and binary conversion
  4. hexadecimal to octal,binary and decimal conversion.

the first function will convert decimal to binary value in it n % 2 gives remainder and n is divided by 2. the for lop will execute until the value becomes 1. and the value will be printed from MSB to LSB.

the second function converts decimal to octal values. in it n is divided by 8 and its % gives value and the number is printed from MSB to LSB using count.

the third function converts deccimal to hexadecimal. the same things will be done but we will do it with 16 and after it the type casting is done.

the fourth function convert binary to decimal is this the base will be multiplied with the individual decimal value.

the fifth function is conversion from binary to octal the values will be multiplied by 8. then convert decimal to octal

in sixth binary to hexadecimal multiplied by 16 then convert decimal to hexa decimal

in next functions the conversion will be done by either dividing if it is to be converted in binary and multiplication if the conversion is foor decimal

the switch case will work according to input in main function and the remaining three values will be displayed

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published