bit shifting and replacing in an array

12 vues (au cours des 30 derniers jours)
anakhi hazarika
anakhi hazarika le 19 Sep 2019
I have an array A= [ 1 1 0] and W=11(binary). I want to replace the 1s by W (i.e 11) and 0s by 00. After that i want to shift and add the numbers like:
1 1 0
11 11 00
then, shift and add:
00
11
11
finally sum is: 10010
Kindly help me to doing this with matlab code. Thank you...

Réponses (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by