# Can someone please explain what "y = (3x) mod 8" means?

#### Keego

##### Diamond Member
It was a past HW question in digital logic and I'm clueless

For reference.. it's #1:
HW problem
solution

#### amnesiac

##### Lifer
Gah, modular math is teh ghey.
see?

#### MichaelD

##### Lifer
To the eighth power? <---shot in the pitch-black dark

##### Diamond Member
3 goes into 8 only 2x. If it goes into 8 3x, then it is "1" over 8. Making the answer 1.

edit: don't listen to me, i'm only trying to sound smart....hehe.

#### Keego

##### Diamond Member
3 goes into 8 only 2x. If it goes into 8 3x, then it is "1" over 8. Making the answer 1.

it's a table as an answer, there are 8 inputs (0-7 in binary)

#### pillage2001

##### Lifer
3 goes into 8 only 2x. If it goes into 8 3x, then it is "1" over 8. Making the answer 1.

huh??

#### HombrePequeno

##### Diamond Member
Good old modular math.

#### hamburglar

##### Platinum Member
y is the answer when you put in x in (3x), then find the remainder when divided by 8. For instance, say x is 9. then 3 * 3 mod 8 = 9 mod 8. 9 divided by 8 gives remainder 1. there for y is 1. y is between 0 and 8, not including 8. Never more, never less.