Can i do modulus on a TI-83? How can i compute a negative modulus?

In summary: Thank you!In summary, the conversation was about understanding how to use modulo, specifically modulo 26, in cryptography and data security. The key takeaway is that if a negative number is obtained, it can be reduced by adding a multiple of the modulus until the smallest positive value is obtained. The conversation also briefly mentioned using the euclidean algorithm to calculate modular division, but it was suggested to use the function "fPart" on a TI-83 calculator instead.
  • #1
kirkulator
33
0
I am studying Integer Modulo in my Cryptography and Data Security class. We are dealing with mainly modulo 26 [the alphabet] right now. I understand if it is addition or multiplication you just take the remainder of the result divided by, let's say 26 in this circumstance. ie: (5+25)mod26 = 4
ie: (5*6)mod26 = 4

But I'm not quite understanding how to do mod26 when there results a negative number.
ie: the shift cipher is (x-k)mod26
which usually results in a negative because k is usually > x
so say, if i had -7mod26
how would i go about this?

Also is there any way to calculate this sort of problem on my calculator to check my work? I have a TI-83.

Thanks so much guys.
Amanda
 
Physics news on Phys.org
  • #2
Not sure if this is what you mean, but hopefully this is helpful:

you can reduce any number by the modulus. If you had 123 mod 26, this is congruent to 97 which is congruent to 71 congruent to 45 congruent to 19 congruent to -7 and so on. If you want the smallest positive value, its 19 in this case.

Basically, if you have a negative value, simply add a multiple of the modulus to it until you get the smallest positive value that is less than the modulus itself.

Not sure about your calculator in particular though (so I am sorry if you already knew this and it is thus irrelevant)
 
  • #3
Just to clarify, youre saying -7mod8 would be 1? [-7+8] = 1 < 8, the answer is one?
and -21mod8 would be 3 because [-21 + 24] = 3 < 8?

Thanks so much this really did help a LOT. I don't think there's a way to do mod on the calculator everywhere i look says you must program it yourself.
 
  • #4
kirkulator said:
Just to clarify, youre saying -7mod8 would be 1? [-7+8] = 1 < 8, the answer is one?
and -21mod8 would be 3 because [-21 + 24] = 3 < 8?

That's correct!
 
  • #5
Wow, that's extremely simple and a lot more clear than how my prof explained it. You wouldn't have an equivalently elegant way of explaining modular division [reciprocals] would you? The only way he told us how to do, say 5(-1)mod26 {where 5(-1) is representing the reciprocal of 5), is to use the euclidean algorithm, in which he didnt explain well either. If this is too exhaustive to explain, then don't worry about it! I've been trying to find some good explanations online.
 
  • #6
For a Ti-83, the best you are going to get is
Code:
x fPart(y/x)
for [itex]y \!\mod x[/itex]
 
  • #7
great, ill take note of that function of my calculator.
 

1. Can I do modulus on a TI-83?

Yes, the TI-83 calculator has a built-in modulus function that can be accessed by pressing the "MOD" button. This function can be used to find the remainder when dividing two numbers.

2. How do I use the modulus function on a TI-83?

To use the modulus function on a TI-83, simply enter the first number, press the "MOD" button, and then enter the second number. The calculator will display the remainder as the result.

3. Can I use the modulus function to compute negative numbers on a TI-83?

Yes, the modulus function on a TI-83 can be used to compute negative numbers. However, the result will always be positive. To compute a negative modulus, you can use the formula: a mod b = a - (b * floor(a/b)), where "a" is the dividend and "b" is the divisor.

4. Is there a shortcut for computing negative modulus on a TI-83?

Yes, there is a shortcut for computing negative modulus on a TI-83. You can use the "remainder" function, denoted by "rem(", to compute a negative modulus. For example, to find -5 mod 3, you can enter "rem(-5,3)" and the calculator will display the result as 1.

5. Can I use the modulus function to compute fractions on a TI-83?

Yes, the modulus function on a TI-83 can be used to compute fractions. The calculator will display the remainder as a decimal value. However, it is recommended to convert the fraction into an equivalent decimal value before using the modulus function for more accurate results.

Similar threads

Replies
5
Views
2K
  • Calculus and Beyond Homework Help
Replies
4
Views
1K
  • Introductory Physics Homework Help
Replies
17
Views
849
  • Computing and Technology
Replies
2
Views
9K
  • Computing and Technology
Replies
15
Views
7K
  • Advanced Physics Homework Help
Replies
1
Views
2K
Replies
19
Views
1K
Replies
7
Views
39K
Replies
3
Views
999
  • Engineering and Comp Sci Homework Help
Replies
3
Views
3K
Back
Top