CONVERT THE FOLLOWING USING MATLAB ONLY!
Number conversion using matlab between binary and decimal. Showthe working steps.
1) Convert the binary number 1010001 into decimal. 2) Convertthe decimal number 145 into binary.
Number conversion using matlab between hexadecimal and decimal.Show the working steps.
1) Convert the hexadecimal number B4E3 into decimal. 2) Convertthe decimal number 52705 into hexadecimal.
Solution
b = “1010001”;
decimal = bin2dec(b)
d = 145;
binary = dec2bin(d)
hex = “B4E3”;
hexToDecimal = hex2dec(hex)
dec = 52705;
decToHex = dec2hex(dec)
Your Code b “1010001”; 2 decimal
OR
OR