Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

Computer Programming

Rating
-
Sold
-
Pages
4
Uploaded on
11-08-2025
Written in
2025/2026

In this lesson, we introduce the key number systems that Java programmers use, especially when they’re working on software projects that require close interaction with machine-level hardware. Projects like this include operating systems, computer networking software, compilers, database systems and applications requiring high performance. Numbers can be represented in a variety of ways. The representation depends on what is called the BASE. The following are the four most common representations.

Show more Read less
Institution
Course

Content preview

Number Systems
In this lesson, we introduce the key number systems that Java programmers use, especially when they’re working on software
projects that require close interaction with machine-level hardware. Projects like this include operating systems, computer
networking software, compilers, database systems and applications requiring high performance. Numbers can be represented in a
variety of ways. The representation depends on what is called the BASE. The following are the four most common
representations.

1. Decimal
We normally represent numbers in their decimal form. Numbers in decimal form are in base 10. This means that the only
digits that appear are 0-9. Here are examples of numbers written in decimal form:
12610 (normally written as just 126)
1110 (normally written as just 11)

2. Binary
Numbers in binary form are in base 2. This means that the only legal digits are 0 and 1. The subscript 2 is needed to
indicate that the number is a binary number. Here are examples of numbers written in binary form:
11111102
10112

3. Octal
Numbers in octal form are in base 8. This means that the only legal digits are 0-7. The subscript 8 is needed to indicate
that the number is an octal number. Here are examples of numbers written in octal form:
1768
138

4. Hexadecimal
Numbers in hexadecimal form are in base 16. The subscript 16 is needed to indicate that the number is a hexadecimal
number. Hexadecimal numbers are often used to abbreviate binary numbers, with each hexadecimal digit representing exactly
four binary digits. The hexadecimal number system has sixteen digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F. The
letters A, B, C, D, E, and F correspond to the decimal numbers 10, 11, 12, 13, 14, and 15.Here are examples of numbers
written in hexadecimal form:
7E16
B16

Conversions of Number System
1. Decimal to Binary / Binary to Decimal
To convert a decimal number to binary, continuously divide the number by 2 and get the remainder (which is either 0 or
1), and get that number as a digit of the binary form of the number. Get the quotient and divide that number again by 2 and
repeat the whole process until the quotient reaches 0 or 1. Get all the remainders starting from the last remainder, and the
result is the binary form of the number.

NOTE: For the last digit which is already less than the divisor (which is 2) just copy the value to the remainder portion.

Example: Convert 12610 = ____ 2.




Writing the remainders from the bottom up, we get the binary number 1111110 2.

To convert a binary number to decimal, multiply the binary digit to "2 raised to the position of the binary number", then
add all the products to get the resulting decimal number.

Written for

Institution
Course

Document information

Uploaded on
August 11, 2025
Number of pages
4
Written in
2025/2026
Type
Class notes
Professor(s)
N/a
Contains
All classes

Subjects

$8.09
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
ramgabrielle

Get to know the seller

Seller avatar
ramgabrielle Saint Louis University
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
3 year
Number of followers
0
Documents
6
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions