2d array not populated correctly when using bitshift

@willpowell Can you elaborate a little on what your application is supposed to do? Maybe there are easier ways to achieve your goal. Are you sure you actually need all this bit shifting, for instance?