%% Set Bits to On
% Add powers of 2 onto a number.

A = 4;
intout = bitset(A,4:6)

%
% You can see that bitset sequentially turns on bits 4 through 6.

c = dec2bin(intout)

% Copyright 2012 The MathWorks, Inc.