blob: 14241fe34a010556d2306238d6056661edb8ad93 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
//example 1.13.a//
clc
//clears the screen//
clear
//clears all existing variables//
t=9999+1;
//total numbers//
x=log2(t);
//taking out power//
y=round(x)+1;
//no of bits required for straight binary encoding//
disp(y,'no of bits required for straight binary encoding = ')
|