3 views

Uploaded by sweethome1997

Number system 2

- Math g4 m5 Full Module
- Date Functions
- pin31tohex
- Mathematics Objectives Y1and2
- lec18
- Partial+quotients.dr.cx.pptx
- Elektron CC Guide
- Online Math Lessons
- 2-3 Grade Math Card Games
- framewk_math3
- lesson plan one
- Budget of Work Math Grade 4 - Subtasked
- MATHEMATICS Form 1 chapter 1.docx
- ps grade1curriculummap2015-2016 1516 docx (1)
- DLL_MATH Q1 W1
- fx-570_991EX_EN
- ELEC3270_ Digital Logic Primer
- Bits & Bytes Number
- 26011560 Tasm User s Manual Tasm a Table
- 6-12th Curriculum Map - Term 1

You are on page 1of 25

Operations

Part II

Signed Numbers

Because the 2s complement form for

representing signed numbers is the most

widely used in computer systems. Well

limit to 2s complement arithmetic on:

Addition

Subtraction

Multiplication

Division

Addition

4 cases that can occur when 2 signed

numbers are added:

Positive number with magnitude larger than

negative number

Negative number with magnitude larger than

positive number

Both numbers negative

Addition

Both numbers positive:

ex:

00000111

+00000100

00001011

7

+4

11

(uncomplemented) binary.

Addition

Positive number with magnitude larger

than negative number:

ex:

00001111

15

+11111010

+6

00001001

9

Discard1

carry

positive and is therefore in true

(uncomplemented) binary.

Addition

Negative number with magnitude larger

than positive number:

ex:

00010000

+11101000

11111000

16

+24

8

complement form.

Addition

Both numbers negative:

ex:

11111011

5

+11110111

+9

Discard1

11110010

14

carry

negative and therefore in 2s complement

form.

Addition

Remark:

complement form so, as you can see, the

addition process is very simple: Add the two

numbers and discard any final carry bit.

Addition

Overflow condition:

and the number of bits

required to represent the sum

exceeds the number of bits in

the two numbers, an overflow

results as indicated by an

incorrect sign bit.

An overflow can occur only

when both numbers are + or -.

ex: 01111101

+00111010

10110111

Magnitude

incorrect

Sign

incorrect

125

+58

183

Addition

Numbers are added two at a time:

numbers at a time.

00010010

68

01000100

+27

+00011011

Add1sttwonumbers

95

01011111

1stsum

+14

+00001110

Add3rdnumber

109

01101101

2ndsum

+18

+00010010

Add4thnumber

127

01111111

Finalsum

Subtraction

Subtraction is a special case of addition.

subtrahend changed.

The result of a subtraction is called the

difference.

changed by taking its 2s complement.

_______________________________

Subtrahend = , Minuend =

Subtraction

Since subtraction is simply an addition

with the sign of the subtrahend changed,

the process is stated as follows:

complement of the subtrahend and add.

Discard any final carry.

Subtraction

ex: Perform each of the following subtraction of the signed numbers:

(a)0000100000000011

(b)0000110011110111

(c)1110011100010011

(d)1000100011100010

(a)00001000

+11111101

100000101

8

+3

5

(b)00001100

+00001001

00010101

(c)11100111

+11101101

111010100

25

+19

44

(d)10001000120

+00011110+30

1010011090

12

+9

21

Numbers

Hexadecimal Numbers

We will call it for short as hex.

It has 16 characters. Digits 0-9 and letters

A-F.

It used primarily as a compact way of

displaying or writing binary numbers since

it is very easy to convert between bin and

hex.

microprocessor applications.

Hexadecimal Numbers

Decimal

Binary

Hexadecimal

0000

0001

0010

0011

0100

0101

0110

0111

1000

1001

10

1010

11

1011

12

1100

13

1101

14

1110

15

1111

Hexadecimal Numbers

If you see h mixing in numbers (in the

context of computer systems), please note

that its most likely that the numbers are

hexadecimal numbers. (Be careful. h is

not one of A-F using in hex).

For example

16h=000101102

0Dh=000011012

Hexadecimal Numbers

Bin-to-Hex Conversion

groups, starting at the right-most bit and

replace each 4-bit group with the equivalent

hex symbol.

(a)1100101001010111

(b)111111000101101001

1100101001010111

00111111000101101001

CA57

=CA5716

3F169

=3F16916

Hexadecimal Numbers

Hex-to-Bin Conversion

replace each hex symbol with the appropriate

four bits.

ex: Determine the binary numbers for the following hex numbers:

(a)10A4h

(b)CF8Eh

10A4 CF8E

(c)9742h

9742

0001000010100100 11001111100011101001011101000010

Hexadecimal Numbers

Hex-to-Dec Conversion

2 methods:

Hex-to-Bin first and then Bin-to-Dec.

Multiply the decimal values of each hex digits by its

weight and then take the sum of these products.

Hexadecimal Numbers

Hex-to-Dec Conversion

(a)1Ch

1Ch=00011100=16+8+4=2810

(b)A85h

A85h=101010000101=2048+512+128+4+1=269310

Hexadecimal Numbers

Hex-to-Dec Conversion

weight and then take the sum of these products.

(a)E5h

E5h=(Ex16)+(5x1)=(14x16)+5=224+5=22910

(b)B2F8h

B2F8h=(Bx4096)+(2x256)+(Fx16)+(8x1)

=(11x4096)+(2x256)+(15x16)+(8x1)

=45,056+512+240+8=45,81610

Hexadecimal Numbers

Dec-to-Hex conversion

LSD

650/16 = 40.625

0.625x16 = 10 = A

40/16 = 2.5

0.5x16

2/16 = 0.125

0.125x16 = 2 = 2

number quotient is

ZERO.

=8 =8

MSD

Octal Numbers

Like the hex, the oct provides a convenient

way to express binary numbers and codes. (but,

its not as commonly used as hex).

8 digits: 0-7

0,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,20,

same way on oct just mark this:

Oct = 3 binary bits

Octal Numbers

Bin-to-Oct Conversion

(a)110101 (b)101111001

(c)100110011010 (d)11010000100

Oct-to-Bin Conversion

(a)138(b)258(c)1408(d)75268

Oct-to-Dec Conversion

(a)23748

Dec-to-Oct Conversion

(a)35910

- Math g4 m5 Full ModuleUploaded bypeppylepepper
- Date FunctionsUploaded byrodrigobrar20037123
- pin31tohexUploaded bysandeep2506
- Mathematics Objectives Y1and2Uploaded byvidhyaa1011
- lec18Uploaded byablos
- Partial+quotients.dr.cx.pptxUploaded bycathrrrrr
- Elektron CC GuideUploaded byaksuper1
- Online Math LessonsUploaded byipracticemath
- 2-3 Grade Math Card GamesUploaded byMrityunjay Kumar Rai
- framewk_math3Uploaded by1dulles
- lesson plan oneUploaded byapi-322313363
- Budget of Work Math Grade 4 - SubtaskedUploaded byChristopher Johnson
- MATHEMATICS Form 1 chapter 1.docxUploaded byTeoh Milay
- ps grade1curriculummap2015-2016 1516 docx (1)Uploaded byapi-292158599
- DLL_MATH Q1 W1Uploaded byJoel Cabangis
- fx-570_991EX_ENUploaded byEmanuel Gabriel
- ELEC3270_ Digital Logic PrimerUploaded byqarikhalid
- Bits & Bytes NumberUploaded bymhussain
- 26011560 Tasm User s Manual Tasm a TableUploaded byMiguel Damian
- 6-12th Curriculum Map - Term 1Uploaded byAllan Abad
- math vocabulary gr 1 2Uploaded byapi-326416336
- Sintesis de Periodo IIIUploaded byNini Johanna SJ
- Analisis ItemUploaded byJomad Mohd
- Chapter 3 Parent LetterUploaded bykwhitley3
- 05 Interworking EIS KNXUploaded byJosé Luis Blanco
- Why the Common Core?Uploaded bykmgriswold
- Definition Place ValueUploaded bysopnaaa
- 01 IntroductionUploaded byDikxon Hervery Sihombing
- Directed Numbers - Lesson PlanUploaded byAteef Hatifa
- PreludeProgramming6ed_pp02.pdfUploaded bySadie

- Doc1Uploaded bysweethome1997
- p HistoryUploaded bysweethome1997
- ancientworldweek1.pptUploaded bysweethome1997
- parts_of_a_computer.docUploaded bysweethome1997
- Mutual NDA TemplateUploaded bySenthilkumar Sivanandam
- 4 Keyboard Worksheets home middle bottom rows.pdfUploaded bysweethome1997
- MediterraneanUploaded bysweethome1997
- Ancient World Week 1Uploaded bysweethome1997
- Ancient World Week 1Uploaded bysweethome1997
- Software Quality Models and Philosophies (1)Uploaded bysweethome1997
- HistoryUploaded bysweethome1997
- Abacus Seed Sector Study-Table of ContentsUploaded bysweethome1997
- 1-3 Chapter 9 Social PsychologyUploaded byVukashin.me
- CH 02Uploaded bysweethome1997
- Basics of GUI in JavaUploaded bysweethome1997
- zspecification-140612072121-phpapp01Uploaded bysweethome1997
- Fragmentación Horizontal en Base de Datos DistribuidaUploaded byJulio César Sosa Yeladaqui
- 01 IntroductionUploaded bysweethome1997
- NumSys-Part1Uploaded bysweethome1997
- 1 - Software Quality EngineeringUploaded bysweethome1997
- Case Study - LittletonUploaded bysweethome1997
- Chapter 11(1)Uploaded bysweethome1997
- Descriptive Essay SamplesUploaded byrubinak
- OCLUploaded bysweethome1997

- CBT - Errors ListUploaded byShaikh Abdulsaboor Sapru
- The Parsee Religion (by Dadabhai Naoroji)Uploaded bysomebody535
- CAPE Information Technology Unit One NotesUploaded bysmartkid167
- Structural Analysis OfUploaded byNaila Akram
- Vocal ManualUploaded byvegarj81
- Cleft SentencesUploaded bySidney Weedy
- Frey, Sabbath in Egypt? an Examination of Exodus 5Uploaded byanewgiani6288
- ACS42_RNUploaded byavdsouza
- Buddhist IndiaUploaded byau de lek
- LMNs- Algorithms - GeeksforGeeksUploaded byAnchal Rajpal
- Summary of "Meaning and Action" by May Brodbeck (1968)Uploaded byWit Up Prasompluem
- DEvelopment of ELTUploaded byHilmiyah C'bungzhumandja
- Religious Lectur By Professor Dr.Rupnathji ( Dr.Rupak Nath )Uploaded bytantraguru
- 3BSE018751D1Uploaded bykanbouch
- IDoc Config GoodUploaded byanshul55
- Analytic Phonics vs Synthetic Phonics.docUploaded bySusanaGM
- Java Servlet SpecificationUploaded byapi-19625511
- zf 6 mnemonic flyerUploaded byapi-272673693
- Mit Matlab CourseUploaded bywistonjr
- Purnanandalahari p1d4Uploaded byवाधूलं कण्णन् कुमारस्वामि
- spring-boot-reference.pdfUploaded byArun Kumar
- Apple Lisa: Sales Marketing Binder [February 1984]Uploaded byMatthew Keys
- HCNPUploaded byDanilo Escobar
- Tomback Phoenician LexiconUploaded bytargumin
- Seamus Heaney IOCUploaded byfalzar292
- Spectrum Beer's Law Release Notes.pdfUploaded byMuhammad Balyan
- The Struggle for Water in Peru. Comedy and Tragedy in the Andean Commons - Paul TrawickUploaded byvengador
- euclid.tmj.1178244779.pdfUploaded bymanusansano
- Wellington Tamil Christian Fellowship News Letter June 2012Uploaded byclem2k
- Complete Analysis of the Poem, "Wedding-Ring," by Denise LevetovUploaded byCaleb Benjamin Wechsler