Decimal to 8 bit binary conversion
The number system conversion from decimal into binary is carried out by arithmetic operators, modulus and divider. The conversion program has to be given a decimal value which must be in the range from 0 to 255 and it returns binary 8 bits as a result of the conversion. Decimal to binary 8 bits conversion - Steps Given a decimal value, decval and converts it into binary 8 bits modulus decval (the given decimal value) by 2, it returns a reminder ( 0 or 1) divide decval by 2, it returns a quotient the quotient becomes the decval and repeat step 1 to 3 for 8 times the reminders on each iteration is results binary 8 bits Decimal to binary 8 bits conversion - Example Given decimal value = 143 ,convert it into binary 8 bits divide the decimal value by 2 returns a quotient and reminder, ...