CPSC 121 Lecture Notes - Lecture 10: Real Number, Ebcdic, Decimal Mark

68 views3 pages
Verified Note
28 Jan 2020
School
Course

Document Summary

Cpsc 121 lecture #3 representing values pt. Topics included: modular arithmetic (module 3. 2, characters (3. 3, thought experiment: is being 1/3 scottish possible, real numbers (3. 4, decimals in binary, mantissas, exponents, and storing fractions in java, floating and/or inexact numbers. Modular arithmetic: modulo (% or mod"): x mod m finds the remainder when x is divided by m, example: 19 mod 8 = 1 because 19/8 = 2 with a remainder of 1. If two numbers a and b are in the same class, then a b: example: a 19 mod 3. That way, you"ll get all the right numbers and the numbers in front won"t get cut off: analogy: using the (2 + 4 + 6) / 2 == (2/2) + (4/2) + (6/2) analogy. Let"s say you can only store, in base 10, single digit numbers. However, 2+4+6 = 12, which is too big to store.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents