blob: c9cb16c5e3136db07fb2544c3aca59a9e3b9e732 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
//Chapter 23, Example 23.21
clc
//Initialisation
x="F851" //hex number to be convert
//Calculation
z1=hex2dec(x) //conversion to decimal
z2=dec2bin(z1) //conversion to binary
//Results
printf("Binary of F851 = %s",z2)
|