# Why GF(256) matrix only have zero and one number?

like this

```
sage: matrix(GF(2**8), [1, 2, 3, 4])
[1 0 1 0]
```

I just want do some matrix calculate mod 256, can any help me, please?

Why GF(256) matrix only have zero and one number?

like this

```
sage: matrix(GF(2**8), [1, 2, 3, 4])
[1 0 1 0]
```

I just want do some matrix calculate mod 256, can any help me, please?

add a comment

2

If you want to work mod 256, you should work with `Integers(256)`

, not `GF(256)`

. (The first of these is the ring `Z/256`

, the second is the field with 256 elements.)

```
sage: matrix(Integers(256), [1,2,3,4])
[1 2 3 4]
sage: matrix(Integers(256), [254, 255, 256, 257])
[254 255 0 1]
```

(edited to add the second example)

`IntegerModRing(256)`

is a synonym for `Integers(256)`

, by the way.

2

`K=GF(256)`

has characteristic 2, which result do you expect for `K(3)`

?

Asked: **
2019-08-04 06:27:35 -0600
**

Seen: **34 times**

Last updated: **Aug 06**

Lifting matrices to $SL_2(\mathbb{Z})$

Problem with conjugate_transpose of a symbolic matrix

how to obtain the real part of a complex function

Is there a way to simplify_full and trig_reduce a matrix?

How to solve linear programming in matrix form?

How to express unknown coefficients in GF(2^8)?

Random positive definite matrix

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.