MATLAB Answers


Replace binary values with varying binary values

Asked by lavanya vs on 23 Apr 2019
Latest activity Commented on by lavanya vs on 25 Apr 2019
I have an array of 32 bit binary numbers and I want to replace the last bits with varying lengths of binary numbers.
10111 10110 In this I only change the last bit
10011 10000 In this one I only change the last 2 bits
and so on


Show 1 older comment
'11100001000' Now I want to change the last 4 bits for the first value
3 bits for the second value
1 bit for the third value depending on the count of the bits I need
'11100001001' to replace.
I still don't understand the question. The example looks like a simple count from 1800, 1801, ..., 1807 in binary.
I want to encode the last few bits based on a mapping ( using LSB)

Sign in to comment.

0 Answers