add binary in matrix