If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

### Course: AP®︎/College Computer Science Principles>Unit 1

Lesson 2: Binary numbers

# Decimal system refresher

Review how the decimal number system works before diving into the binary number system. The decimal number system and binary number system work the same way; the only difference is what each digit represents (0-9 versus 0/1). Created by Pamela Fox.

## Want to join the conversation?

• The decimal system works well for rational numbers, but what about irrational numbers like Pi? Is there a way to show these numbers in the decimal system? Or, is the decimal system inherently limited to representing certain kinds of numbers (e.g., rational numbers)?
• The decimal system cannot fully express irrational numbers as all irrational numbers will require an infinite number of digits to be completely written out. The decimal system can only write out rational approximations for irrational numbers by rounding after a certain number of decimal places.
• what about irrational numbers like Pi?
• This is an excellent point. Irrational numbers have infinite representations, so they can only be approximated by finite representations in computers.

so Pi would be truncated to something like 3.1415 instead of 3.14159265...

Hope this helps
• they are cool
(1 vote)
• what is a decimal system
• The decimal system contains 10 digits, 0 through 9. The binary system contains digits, 0 through 1. A decimal number is 69, while the binary number is `1000101`. Because binary has a smaller repository of digits, the numbers contain more places.
• The decimal system works well for rational numbers, but what about irrational numbers like Pi? Is there a way to show these numbers in the decimal system? Or, is the decimal system inherently limited to representing certain kinds of numbers (e.g., rational numbers)?The decimal system cannot fully express irrational numbers as all irrational numbers will require an infinite number of digits to be completely written out. The decimal system can only write out rational approximations for irrational numbers by rounding after a certain number of decimal places.what about irrational numbers like Pi?This is an excellent point. Irrational numbers have infinite representations, so they can only be approximated by finite representations in computers.

so Pi would be truncated to something like 3.1415 instead of 3.14159265...
• why are we doing this?
(1 vote)
• How is it used
(1 vote)
• what about the fractions numbers?
(1 vote)
• The decimal system works well for rational numbers, but what about irrational numbers like Pi? Is there a way to show these numbers in the decimal system? Or, is the decimal system inherently limited to representing certain kinds of numbers (e.g., rational numbers)?