summaryrefslogtreecommitdiff
path: root/462/CH2/EX2.31/ex_2_31.sce
blob: 858b7c41208e1e4493accae73a52aa69819e778c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//example 2.31//
//conversion of binary to hexadecimal//
clc
//clears the screen//
clear
//clears already existing variables//
x=bin2dec('10100110101111')
//binary to decimal conversion//
a=dec2hex(x)
//decimal to hexadecimal conversion//
disp('conversion of given binary number to its hexadecimal form is:')
disp(a)
//answer in hexadecimal form//