SlideShare a Scribd company logo
11
Most read
12
Most read
13
Most read
Computer
Architecture & organization
ALU
S.CIYAMALA KUSHBU
ASSISTANT PROFESSOR/ECE
ALU
NUMBER SYSTEMS
 Human beings use decimal (base 10)
and duodecimal (base 12) number systems for
counting and measurements.
 Computers use binary (base 2) number system, as
they are made from binary digital components
(known as transistors) operating in two states - on
and off.
 In computing, we also use hexadecimal (base 16)
or octal (base 8) number systems, as a compact form
for representing binary numbers.
 Example :10101010 AA(H) and 252(O)
BINARY NUMBER REPRESENTATION
WHAT IS FIXED AND FLOATING POINT?
 A fixed point number just means that there are
a fixed number of digits after the decimal point.
EX:123.45, 1234.56, 12345.67
 A floating point number allows for a varying
number of digits after the decimal point.
EX:1.234567, 0.00001234567
FIXED POINT NUMBERS
 Computers use a fixed number of bits to represent an
integer. The commonly-used bit-lengths for integers
are 8-bit, 16-bit, 32-bit or 64-bit.
 There are two representation schemes for integers:
 Unsigned Integers: can represent zero and positive
integers.
 Signed Integers: can represent zero, positive and
negative integers.
Three representation schemes had been proposed for
signed integers:
Sign-Magnitude representation
1's Complement representation
2's Complement representation
CONVERTION OF DECIMAL NUMBER 30
INTO 8 BIT BINARY NUMBER
8 7 6 5 4 3 2 1 8-bits
2^7 2^6 2^5 2^4 2^3 2^2 2^1 2^0 2^n
representation
128 64 32 16 8 4 2 1 value
0 0 0 1 1 1 1 0 Eg: for value 30
in 8 bit
Unsigned and Signed  fixed point Addition and subtraction
UNSIGNED NUMBERS
 N bits -Magnitude (absolute value) of the integer
 EXAMPLE: UNSIGNED ADDITION AND SUBTRACTION
8 - 4 in 4 bit
representation
8 1000
4 0100 (-)
------------------
4 0100
----------------------
8 + 4 in 4 bit
representation
8 1000
4 0100 (+)
------------------
12 1100
----------------------
SIGNED NUMBERS
SIGN MAGINTUDE 1’S COMPLEMENT 2’S COMPLEMENT
Nth bit or
MSB
N-1bits
Sign bit
FOR POSITIVE INTEGER
Magnitude (absolute value) of the
integer
FOR NEGATIVE INTEGER
Magnitude (absolute value) of the
integer
Sign bit
FOR POSITIVE INTEGER
Magnitude (absolute value) of the
integer.
FOR NEGATIVE INTEGER
Magnitude of
the complement (inverse) of the (n-
1)-bit binary pattern
Sign bit
FOR POSITIVE INTEGER
Magnitude (absolute value) of
the integer.
FOR NEGATIVE INTEGER
Magnitude of the complement of
the (n-1)-bit binary pattern plus
one
Example:
Taken 8 bit
representati
on
+10000 0001
-11000 0001
+00000 0000
-01000 0000
+10000 0001
-11111 1110
+00000 0000
-01111 1111
+10000 0001
-11111 1111
+00000 0000
-00000 0000
Drawback 1. There are two representations
for the number zero.
2. Positive and negative integers
need to be processed
separately.
1. There are two representations
for the number zero.
2. Positive and negative integers
need to be processed
separately.
1.There is only one
representation for the number
zero
2.Positive and negative integers
can be treated together in
addition and subtraction.
Subtraction can be carried out
using the "addition logic".
SIGN MAGINTUDE 1’S COMPLEMENT 2’S COMPLEMENT
Usual
Subtraction in 5
bit
representation
+8 01000
+4 00100 (-)
---------------
+4 00100
----------------
+8 01000
+4 00100 (-)
---------------
+4 00100
---------------
+8 01000
+4 00100 (-)
---------------
+4 00100
---------------
Using addition
to perform
subtraction
+8 01000
-4 10100 (+)
---------------
-12 11100
-----------------
+8 01000
-4 11011 (+)
---------------
+3 00011
---------------
with carry 1 which
should be omitted
+8 01000
-4 11100 (+)
---------------
+4 00100
---------------
with carry 1
which should be
omitted
OVERFLOW RULE FOR ADDITION
 If two numbers which are both positive or negative
are added, then overflow occurs if and only if the
result has the opposite sign
OVERFLOW RULE FOR SUBTRACTION
 If two numbers with opposite sign are subtracted,
then overflow occurs if and only if the result has the
opposite sign
Unsigned and Signed  fixed point Addition and subtraction

More Related Content

PPTX
Harvard Architecture | Computer Science
PPTX
8086 microprocessor-architecture
PDF
Addressing modes in computer organization
PPTX
Finite state machines
PPT
Addressing modes of 8051
PPTX
latches
PPTX
Huffman's Alforithm
PPTX
COA asynchronous data transfer
Harvard Architecture | Computer Science
8086 microprocessor-architecture
Addressing modes in computer organization
Finite state machines
Addressing modes of 8051
latches
Huffman's Alforithm
COA asynchronous data transfer

What's hot (20)

PPT
Half adder & full adder
PDF
Programmable Logic Array(PLA) & Programmable Array Logic(PAL)
PPTX
memory reference instruction
PPTX
Unit-4 (IO Interface).pptx
PPTX
Unit 3 combinational circuits
PPT
8086 microprocessor
DOCX
Programmable logic array
PPTX
Assembly Language
PPT
Introduction state machine
DOCX
UNIT-III-DIGITAL SYSTEM DESIGN
PPT
Assembly Language Basics
PPTX
Status register
PPTX
SOP POS, Minterm and Maxterm
PPTX
Computer Organization : CPU, Memory and I/O organization
DOC
Alu design-project
DOCX
UNIT-IV .FINITE STATE MACHINES
PDF
ADC and DAC interfacing.pdf
DOCX
Counters In Digital Logic Design
PPTX
Flipflop
PPTX
Computer Organization and Architecture.pptx
Half adder & full adder
Programmable Logic Array(PLA) & Programmable Array Logic(PAL)
memory reference instruction
Unit-4 (IO Interface).pptx
Unit 3 combinational circuits
8086 microprocessor
Programmable logic array
Assembly Language
Introduction state machine
UNIT-III-DIGITAL SYSTEM DESIGN
Assembly Language Basics
Status register
SOP POS, Minterm and Maxterm
Computer Organization : CPU, Memory and I/O organization
Alu design-project
UNIT-IV .FINITE STATE MACHINES
ADC and DAC interfacing.pdf
Counters In Digital Logic Design
Flipflop
Computer Organization and Architecture.pptx
Ad

Similar to Unsigned and Signed fixed point Addition and subtraction (20)

PPT
Chapter_1_Digital_Systems_and_Binary_Numbers2.ppt
PDF
DigitalLogic_NumberRepresentation.pdf advanced
PDF
Datarepresentation2
PPT
Data representation moris mano ch 03
PPT
Number_Systems decimal, binary, octal, and hexadecimal
PPT
An introduction to the different number systems
PPT
Number Systems and its effectiveness .ppt
PPT
Number_Systems_Number base conversions.ppt
PPT
Number_Systems _binary_octal_hex_dec.ppt
PPT
Basic Digital_Systems_and_Binary_Numbers Sample.ppt
PPTX
PPT
Number_Systems (2).ppt
PPT
Computer archi&mp
PPT
7730763333333333366666666666666999999993.ppt
PPT
DATA REPRESENTATIONS and Data codes and formats.ppt
PPT
An introduction to data_representation.ppt
PPT
DATA REPRESENTATION
PPTX
Unit 2 Arithmetic
PPT
DL&CO - Unit 1 PPT.ppt DL&CO - Unit 1 PPT.ppt DL&CO - Unit 1 PPT.ppt
Chapter_1_Digital_Systems_and_Binary_Numbers2.ppt
DigitalLogic_NumberRepresentation.pdf advanced
Datarepresentation2
Data representation moris mano ch 03
Number_Systems decimal, binary, octal, and hexadecimal
An introduction to the different number systems
Number Systems and its effectiveness .ppt
Number_Systems_Number base conversions.ppt
Number_Systems _binary_octal_hex_dec.ppt
Basic Digital_Systems_and_Binary_Numbers Sample.ppt
Number_Systems (2).ppt
Computer archi&mp
7730763333333333366666666666666999999993.ppt
DATA REPRESENTATIONS and Data codes and formats.ppt
An introduction to data_representation.ppt
DATA REPRESENTATION
Unit 2 Arithmetic
DL&CO - Unit 1 PPT.ppt DL&CO - Unit 1 PPT.ppt DL&CO - Unit 1 PPT.ppt
Ad

More from ciyamala kushbu (8)

PDF
BCS302-Module 3 -DDCO-Computer structure-VTU 2022 scheme-BCS302.pdf
PDF
BCS302- MODULE 4 Input output organizationfull doc-01.pdf
PDF
BCS302-DDCO-basic processing unit-Module 5- VTU 2022 scheme-DDCO-pdf
PDF
BCS302-Digital Design and computer organization Lab manual- VTU 2022 scheme.pdf
PPT
BCS302- Digital Design and computer organization -VTU-2022 scheme-Expectation...
PPTX
Floating point Numbers
PPTX
UNSIGNED AND SIGNED BINARY DIVISION
PPTX
Unsigned multiplication
BCS302-Module 3 -DDCO-Computer structure-VTU 2022 scheme-BCS302.pdf
BCS302- MODULE 4 Input output organizationfull doc-01.pdf
BCS302-DDCO-basic processing unit-Module 5- VTU 2022 scheme-DDCO-pdf
BCS302-Digital Design and computer organization Lab manual- VTU 2022 scheme.pdf
BCS302- Digital Design and computer organization -VTU-2022 scheme-Expectation...
Floating point Numbers
UNSIGNED AND SIGNED BINARY DIVISION
Unsigned multiplication

Recently uploaded (20)

PPTX
Cell Types and Its function , kingdom of life
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
master seminar digital applications in india
PDF
Classroom Observation Tools for Teachers
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
Lesson notes of climatology university.
PDF
Complications of Minimal Access Surgery at WLH
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Cell Types and Its function , kingdom of life
STATICS OF THE RIGID BODIES Hibbelers.pdf
2.FourierTransform-ShortQuestionswithAnswers.pdf
master seminar digital applications in india
Classroom Observation Tools for Teachers
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
Microbial diseases, their pathogenesis and prophylaxis
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Anesthesia in Laparoscopic Surgery in India
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
FourierSeries-QuestionsWithAnswers(Part-A).pdf
102 student loan defaulters named and shamed – Is someone you know on the list?
O7-L3 Supply Chain Operations - ICLT Program
Pharmacology of Heart Failure /Pharmacotherapy of CHF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Lesson notes of climatology university.
Complications of Minimal Access Surgery at WLH
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...

Unsigned and Signed fixed point Addition and subtraction

  • 2. ALU
  • 3. NUMBER SYSTEMS  Human beings use decimal (base 10) and duodecimal (base 12) number systems for counting and measurements.  Computers use binary (base 2) number system, as they are made from binary digital components (known as transistors) operating in two states - on and off.  In computing, we also use hexadecimal (base 16) or octal (base 8) number systems, as a compact form for representing binary numbers.  Example :10101010 AA(H) and 252(O)
  • 5. WHAT IS FIXED AND FLOATING POINT?  A fixed point number just means that there are a fixed number of digits after the decimal point. EX:123.45, 1234.56, 12345.67  A floating point number allows for a varying number of digits after the decimal point. EX:1.234567, 0.00001234567
  • 6. FIXED POINT NUMBERS  Computers use a fixed number of bits to represent an integer. The commonly-used bit-lengths for integers are 8-bit, 16-bit, 32-bit or 64-bit.  There are two representation schemes for integers:  Unsigned Integers: can represent zero and positive integers.  Signed Integers: can represent zero, positive and negative integers. Three representation schemes had been proposed for signed integers: Sign-Magnitude representation 1's Complement representation 2's Complement representation
  • 7. CONVERTION OF DECIMAL NUMBER 30 INTO 8 BIT BINARY NUMBER 8 7 6 5 4 3 2 1 8-bits 2^7 2^6 2^5 2^4 2^3 2^2 2^1 2^0 2^n representation 128 64 32 16 8 4 2 1 value 0 0 0 1 1 1 1 0 Eg: for value 30 in 8 bit
  • 9. UNSIGNED NUMBERS  N bits -Magnitude (absolute value) of the integer  EXAMPLE: UNSIGNED ADDITION AND SUBTRACTION 8 - 4 in 4 bit representation 8 1000 4 0100 (-) ------------------ 4 0100 ---------------------- 8 + 4 in 4 bit representation 8 1000 4 0100 (+) ------------------ 12 1100 ----------------------
  • 11. SIGN MAGINTUDE 1’S COMPLEMENT 2’S COMPLEMENT Nth bit or MSB N-1bits Sign bit FOR POSITIVE INTEGER Magnitude (absolute value) of the integer FOR NEGATIVE INTEGER Magnitude (absolute value) of the integer Sign bit FOR POSITIVE INTEGER Magnitude (absolute value) of the integer. FOR NEGATIVE INTEGER Magnitude of the complement (inverse) of the (n- 1)-bit binary pattern Sign bit FOR POSITIVE INTEGER Magnitude (absolute value) of the integer. FOR NEGATIVE INTEGER Magnitude of the complement of the (n-1)-bit binary pattern plus one Example: Taken 8 bit representati on +10000 0001 -11000 0001 +00000 0000 -01000 0000 +10000 0001 -11111 1110 +00000 0000 -01111 1111 +10000 0001 -11111 1111 +00000 0000 -00000 0000 Drawback 1. There are two representations for the number zero. 2. Positive and negative integers need to be processed separately. 1. There are two representations for the number zero. 2. Positive and negative integers need to be processed separately. 1.There is only one representation for the number zero 2.Positive and negative integers can be treated together in addition and subtraction. Subtraction can be carried out using the "addition logic".
  • 12. SIGN MAGINTUDE 1’S COMPLEMENT 2’S COMPLEMENT Usual Subtraction in 5 bit representation +8 01000 +4 00100 (-) --------------- +4 00100 ---------------- +8 01000 +4 00100 (-) --------------- +4 00100 --------------- +8 01000 +4 00100 (-) --------------- +4 00100 --------------- Using addition to perform subtraction +8 01000 -4 10100 (+) --------------- -12 11100 ----------------- +8 01000 -4 11011 (+) --------------- +3 00011 --------------- with carry 1 which should be omitted +8 01000 -4 11100 (+) --------------- +4 00100 --------------- with carry 1 which should be omitted
  • 13. OVERFLOW RULE FOR ADDITION  If two numbers which are both positive or negative are added, then overflow occurs if and only if the result has the opposite sign OVERFLOW RULE FOR SUBTRACTION  If two numbers with opposite sign are subtracted, then overflow occurs if and only if the result has the opposite sign