using a binary code for the width of the matrices