Computer Science, asked by JoeL1010, 1 year ago

In which part of computer two numbers are compared

Answers

Answered by yogesh191
4
First your integer numbers are converted into binary numbers. For example, the integer 2 is converted to 0010.

The CPU uses a digital comparator:

A digital comparator or magnitude comparator is a hardware electronic device that takes two numbers as input in binary form and determines whether one number is greater than or less than or equal to the other number.

Comparators are used in central processing units (CPU) and microcontrollers.

Source: https://en.wikipedia.org/wiki/Digital_comparator

In comparator hardware some gates are used (AND, OR, NAND, NOR, XOR, etc). These gates take binary inputs and give result in binary. The output can be seen from a truth table.


nenna123: hi
Similar questions