| | |

Computer Organization and Architecture

Logic Gates

Circuits to Truth Tables

Circuits to Expressions

Expressions to Circuits

Finding SOP from K-Map

Finding POS from K-Map

Finding SOP from K-Map having Don't Care

Half Adders

Full Adders

Flip Flop

Integrated Circuits

Decoders

Multiplexers

Registers

Counters

RAM

ROM

Number Systems

Complements

Number Representations

Binary Addition and Subtraction

Gray Codes

Error Detection Codes

Register Transfer Language

Bus and Memory Transfers

Arithmetic Micro-operations

Logical Micro-operations

Shift Micro-operations

Basic Computer Organization

Timing and Control

Instruction Cycle

Instruction Types

Interrupt Cycle

Complete Computer Description

General Register Organization

Stack Organization

Evaluation of Arithmetic Operations

Address Modes

Instruction Formats

RISC and CISC Architectures

Parallel Processing

Multiplication Algorithms

Logic Gates

Circuits to Truth Tables

Circuits to Expressions

Expressions to Circuits

Finding SOP from K-Map

Finding POS from K-Map

Finding SOP from K-Map having Don't Care

Half Adders

Full Adders

Flip Flop

Integrated Circuits

Decoders

Multiplexers

Registers

Counters

RAM

ROM

Number Systems

Complements

Number Representations

Binary Addition and Subtraction

Gray Codes

Error Detection Codes

Register Transfer Language

Bus and Memory Transfers

Arithmetic Micro-operations

Logical Micro-operations

Shift Micro-operations

Basic Computer Organization

Timing and Control

Instruction Cycle

Instruction Types

Interrupt Cycle

Complete Computer Description

General Register Organization

Stack Organization

Evaluation of Arithmetic Operations

Address Modes

Instruction Formats

RISC and CISC Architectures

Parallel Processing

Multiplication Algorithms

complements are one of the most important aspects of arithmetic operations in digital systems. As we are pretty much familiar with the fact that SUBTRACTION is nothing but a complementED ADDITION, we can carry out a subtraction operation by using the following steps:

- Compute the complement of the SUBTRAHEND.
- Add it with the MENUEND to get the difference.

Complement of any data is needed primarily to perform SUBTRACTION operations. The following example better clarifies the concept:

Suppose we have to calculate: **a = (10 - 6)**

We can do it via any of the two ways stated below:

In Digital Architecture Complements are of following two types:

- (r-1)'s complement
- r's complement

Since complements are of two types, they are significantly different for different number systems. Consider the following table:

Basically in a number system, r represents RADIX or simply the BASE. Thus r's complement means to the complement w.r.t. BASE, similarly (r-1)'s complement means to the complement w.r.t. (BASE-1).

legends | (r-1)'s | r's |
---|---|---|

Formula | ||

Examples | ||

Decimal Numbers | ||

Octal Numbers | ||

Hexadecimal Numbers | ||

Decimal Numbers |

Subtract every digit in the number from (r-1) or (base-1). In contrast:

- Subtract every digit in the number from 9 to calculate 9's compliment
- Subtract every digit in the number from 1 to calculate 1's compliment
- Subtract every digit in the number from 7 to calculate 7's compliment
- Subtract every digit in the number from 15 to calculate 15's compliment

Retain every LSB zero, then subtract the first non-zero digit from r or Base and finally subtract every digit from (r-1) or (Base-1). In Contrast:

- Subtract first non-zero LSB digit from 10 and others from 9 to calculate 10's compliment
- Subtract first non-zero LSB digit from 2 and others from 1 to calculate 2's compliment
- Subtract first non-zero LSB digit from 8 and others from 7 to calculate 8's compliment
- Subtract first non-zero LSB digit from 16 and others from 15 to calculate 16's compliment

Copyright 2018. All Rights Reserved.