Software-Engineering


# Note

Here we gonna transfer Numbers & how to use them in C


# Binary, Octal, Decimal & Hex numbers

# From Dec to Bin

90d = 1011010b

NumberNumber/2Modulo 2(%2)
90450
45221
22110
1151
521
210
101
int binary = 0b1011010;
printf("binary: %d\n", binary);
// Output: binary: 90

# From Dec to Hex

90d = 0x5A

NumberNumber/16Mudolo 16Definition
90510d = oxA90/16 = 5; 16x5 = 80; modulo=10
505d = 0x55/16 = 0; 16x0 = 0; modulo=5
int hex = 0x5A;
printf("hexadecimal: %d\n", hex);
// Output: hexadecimal: 90

# From Dec to Oct

90d = 132o

NumberNumber/8Modulo 8
90112
1113
101
int oct = 0132 // Leading zero = octal number
printf("octal: %d\n, oct");
// Output: octal: 90

# From Hex to Bin