Question
C programming Find the binary equivalent of 361 10 by using long (repeated division by 2) division method. Find the octal equivalent of 101110101.1101 by
C programming
Find the binary equivalent of 36110 by using long (repeated division by 2) division method.
Find the octal equivalent of 101110101.1101 by indirect method (first find out the equivalent decimal number and then find its octal).
Find the hexadecimal equivalent of 1110101.110 by indirect method (first find out the equivalent decimal number and then find its hexadecimal).
Check your answers for above questions using C. output should be like this:
int number = 361;
printf("Integer value is %d " , number);
printf("Hexadecimal value is %x ", number);
printf("Octal value is %o ", number);
printf("Binary value is %b " , number);
NOTE: you can make binary, octal and hexadecimal numbers this way in C and assign them to int variables:
int x = 04321; // the 0 (zero) at the beginning means its an octal value
int y = 0xf8a4; // the 0x (zero then x) at the beginning means its hexadecimal
int z = 0b101101001; // the 0b (zero then b) at the beginning means its binary
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started