views:

17

answers:

0

Problem Statement : We want to left/right shift an array (of size 1~32 bytes) by 4 bits (a nibble).

Example: Input array: |12|34|56|78|91|xxxxxx

Resultant array: |01|23|45|67|89|1x|xxxx

*Here | represents a byte separator. Hence in a byte two numbers are stored (one in each nibble).

Pseudo requirement: We need to use multiple byte access mechanism for faster execution. Accessing each byte and manipulating and storing in the resultant is already done.