n=1011(binary) 11 in decimal and b= 3(decimal) and finally getting answer as 011(binary).the b LSB of n to produce the subexponential code of n.How to implement it in matlab?
n=1011 b=3 z=1|011 ans=011.What will be the program for this in matlab .?
n=1011(binary) 11 in decimal and b= 3(decimal) and finally getting answer as 011(binary).the b LSB of n to produce the subexponential code of n.How to implement it in matlab?
n=1011 b=3 z=1|011 ans=011.What will be the program for this in matlab .?
Hi tojeena, the solution for your problem is you should convert all the number you want to compute either to binary or to decimal and then add all the number finally convert the answer based on your requirements...
to convert decimal to binary use dec2bin(input) and vice versa...
Hi tojeena,
I need the logic or computation example or equation behind that subexponential, or else just send me the code that produce the output as 011...
I have written a code on the idea of the reference paper, and it is give below,
clear all;
clc;
h1 = input('enter the value of k= ', 's');
h2= input('enter the value of n= ', 's');
k = str2num(h1);
n = str2num(h2);
compute = power(2,k);
display(compute);
g=log2;
if (n>compute)
b=floor(g);
u=b-k+1;
end
display(b);
display(u);
I have just initialize the code for you
on this basis of above code you develop further on your own idea...