100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Lecture notes Number Representation $24.62   Add to cart

Class notes

Lecture notes Number Representation

 2 views  0 purchase
  • Course
  • Institution

basic knowledge of computer language.

Preview 3 out of 17  pages

  • August 31, 2023
  • 17
  • 2021/2022
  • Class notes
  • Zafar ali khan
  • All classes
avatar-seller
Computer Science 9608 (Notes)
Chapter: 1.1 Information representation



Topic: 1.1.1 Number representation
Fundamentals of Data Representation:

Before we jump into the world of number systems, we'll need a point of reference; I recommend that you
copy the following table that you can refer to throughout this chapter to check your answers.


Hexadecimal Binary Denary

0 0000 0

1 0001 1

2 0010 2

3 0011 3

4 0100 4

5 0101 5

6 0110 6

7 0111 7

8 1000 8

9 1001 9

A 1010 10

B 1011 11

C 1100 12

D 1101 13

E 1110 14

F 1111 15




Page 1 of 17

,Computer Science 9608 (Notes)
Chapter: 1.1 Information representation



Topic: 1.1.1 Number representation
Denary/Decimal

Denary is the number system that you have most probably grown up with. It is also another way of saying
base 10. This means that there are 10 different numbers that you can use for each digit, namely:

0,1,2,3,4,5,6,7,8,9

Notice that if we wish to say 'ten', we use two of the numbers from the above digits, 1 and 0.

Thousands Hundreds Tens Units
10^3 10^2 10^1 10^0
1000 100 10 1
5 9 7 3

Using the above table we can see that each column has a different value assigned to it. And if we know
the column values we can know the number, this will be very useful when we start looking at other base
systems. Obviously, the number above is: five-thousands, nine-hundreds, seven-tens and three-units.

5*1000 + 9*100 + 7*10 + 3*1 = (5973) 10 R




Binary Number System:

Binary is a base-2 number system, this means that there are two numbers that you can write for each digit
0, 1.
With these two numbers we should be able to write (or make an approximation) of all the numbers that we
could write in denary. Because of their digital nature, a computer's electronics can easily manipulate
numbers stored in binary by treating 1 as "on" and 0 as "off."

2^7 2^6 2^5 2^4 2^3 2^2 2^1 2^0
128 64 32 16 8 4 2 1
0 1 1 0 1 0 1 0

Using the above table we can see that each column has a value assigned to it that is the power of two (the
base number!), and if we take those values and the corresponding digits we can work out the value of the
number: 1*64 + 1*32 + 1*8 + 1*2 = 106.

If you are asked to work out the value of a binary number, the best place to start is by labeling each
column with its corresponding value and adding together all the columns that hold a 1. Let's take a look at
another example:
(00011111) 2
R




128 64 32 16 8 4 2 1
0 0 0 1 1 1 1 1

Page 2 of 17

, Computer Science 9608 (Notes)
Chapter: 1.1 Information representation



Topic: 1.1.1 Number representation
So now all we need to do is to add the columns containing 1s together:
1*16 + 1*8 + 1*4 + 1*2 + 1*1 = 31

Exercise: Binary
U




Convert the following binary numbers into denary
>>(00001100) 2 R




Answer :
128 64 32 16 8 4 2 1
0 0 0 0 1 1 0 0
8+4 = (12) 10
R




Convert the following binary numbers into denary
(01011001) 2 R




Answer :
128 64 32 16 8 4 2 1
0 1 0 1 1 0 0 1
64 + 16 + 8 + 1 = (89) 10 R




Convert the following binary numbers into denary
>>(00000111) 2 R




Answer :
128 64 32 16 8 4 2 1
0 0 0 0 0 1 1 1
4 + 2 + 1 = (7) 10
R




Convert the following binary numbers into denary
>>(01010101) 2 R




Answer :
128 64 32 16 8 4 2 1
0 1 0 1 0 1 0 1
64 + 16 + 4 + 1 = (85) 10 R




How do we tell if a binary number is odd?

Answer :
It's right most digit is a one
Page 3 of 17

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller nafizatasnim. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $24.62. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

73918 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$24.62
  • (0)
  Add to cart