0% found this document useful (0 votes)
51 views5 pages

Cmpe Pt. 1

This document discusses number systems and conversions between them. It covers: - Common number systems like binary, decimal, octal, and hexadecimal - Converting between different bases using positional notation and continuous division/multiplication - Relational, bitwise, and arithmetic operations on different number systems - Complement representations for numbers in diminished and standard radix - Performing addition, subtraction, multiplication, and division on different number systems through examples.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views5 pages

Cmpe Pt. 1

This document discusses number systems and conversions between them. It covers: - Common number systems like binary, decimal, octal, and hexadecimal - Converting between different bases using positional notation and continuous division/multiplication - Relational, bitwise, and arithmetic operations on different number systems - Complement representations for numbers in diminished and standard radix - Performing addition, subtraction, multiplication, and division on different number systems through examples.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Chapter 1: NUMBER SYSTEMS

PART 1
b. base n to Decimal
SOLUTION: using positional notation, it is the
n
total sum of d n x b for n=0 to n−1.
Where,
NUMBER SYSTEM
n – digit position
- Also known as base/radix system
dn – digit representation
b – radix
Radix – pertains to the number of symbols that
is used for counting in a particular number
system.
CONVERT THE FOLLOWING to decimal:
General format: d n−1 d n−2 … d1 d 0 1. 100110 2
2. 234.34 8
3. AB3.8 C 16
COMMON NUMBER SYSTEMS
1. Binary system – base 2 {0,1}
2. Decimal system – base 10 {0-9}
3. Octal system – base 8 {0-7}
4. Hexadecimal system – base 16 {0-9, a-f}

Radix starts from base 2 to base 36. {0-9, a-z}


C. base N 1 to base N 2
SOLUTION:
NUMBER SYSTEM CONVERSION base N 1 → DECIMAL → base N 2
a. Decimal to base n
SOLUTION: USING CONTINUOUS DIVISION
OF BASE N FOR INTEGER PART AND
CONTINUOUS MULTIPLICATION OF BASE N EXAMPLE 3
FOR DECIMAL PART. CONVERT THE FF NUMBER SYSTEMS:
1. 11011002 → base 8
EXAMPLE 1
2. 72 A 16 → base 2
CONVERT THE FOLLOWING:
1. 3810 →binary 3. 4 F .5 K 25 → base 15
2. 156.437510 →octal 4. HP . F 930 → base 20
3. 2739.546875 → hexadecimal 5. 23 AF .10C 16 → base 8
DETERMINING THE RADIX

Solution: using positional notation, both digits


must be converted to decimal then solve for the
unknown base.

SOLVE FOR THE UNKNOWN RADIX:


1. 121R → 144 8
2. 6 AE25 → 301 A R
Chapter 1: NUMBER SYSTEMS
PART 2

NUMBER SYSTEM OPERATIONS

1. Arithmetic operations
2. Bitwise operations
3. Relational operations

RELATIONAL OPERATIONS
RELATIONAL operators are used
to evaluate a condition that's applied to
one or two boolean expressions. The
result of the evaluation is either true or
false.

LISTS OF RELATIONAL OPERATORS:

← LESS THAN !=−¿ NOT


EQUAL
¿−¿ GREATER THAN ¿=−¿
EQUALS
≤−¿ LESS THAN OR EQUAL ¿∧−¿ LOGICAL
AND
≥−¿ GREATER THAN OR EQUAL ¿∨−¿ LOGICAL
OR

BITWISE OPERATIONS

A bitwise operator works with the


binary representation of a number rather
than that number's value. The operand
is treated as a set of bits, instead of as a
single number. Bitwise operators are
similar in most languages that support
them.

LISTS OF BITWISE OPERATORS:

¿−¿ AND OPERATOR ¿−¿ OR OPERATOR ¿−¿ XOR


OPERATOR

!−¿ NOT OPERATOR ≪−¿ SHIFT LEFT ≫−¿ SHIFT


COMPLEMENTS
Two forms of complement
DIMINISHED RADIX: (r −1)' s Complement =( r n−1 ) −N
RADIX: r s Complement =[ ( r −1 )−N ]+1
' n

WHERE,
r – RADIX
N – given number in decimal
n – no. of characters/digit of the given
number

EXAMPLE 1 ADDITION (EXAMPLE 3)


Given: 1. 2374 10+ 899210
1. 100110 2, evaluate 1’s and 2’s 2. 57718 +4273 8
complement 3. A 0 FFC 716+ E 359 B16 + B 11 AF 16
2. 2 F 31C 816, evaluate 15’s and 16’s 4.
complement 100110 2+1111 2+111011 2+1111102 +1011112
3. I 1 BFSR30 , evaluate 29’s and 30’s
complement
C. SUBTRACTION OF NUMBER E. DIVISION OF NUMBER SYSTEM
SYSTEMS
1. 8147 10−258210 1. 25 B7 16 / A 16
2. F 002 C 316 −493 BA16 2. 2 FG 319 /1619
3. 1010012−100110 2

D. MULTIPLICATION OF NUMBER
SYSTEMS
1.35774 8 x 1218
2.6 A 5 F 220 x 15 A 20

You might also like