Computer systems use several number systems to represent and store data.
The most common are:
Binary: Base 2 number system, used by computers to store data as a
combination of 0s and 1s.
Decimal: Base 10 number system, used by humans to represent numbers.
Hexadecimal: Base 16 number system, often used as a shorthand
representation of binary data.
Octal: Base 8 number system, used in computing to represent binary data
in a more compact form.
Each number system has its own advantages and disadvantages, but binary
is the most commonly used number system in computers because it is easy for
computers to process.
logic gates in computer
Logic gates are the building blocks of digital circuits in computers.
They perform basic logical operations on binary inputs and produce a binary
output. The following are the most common logic gates used in computers:
AND Gate: Output is 1 only if both inputs are 1.
OR Gate: Output is 1 if one or both inputs are 1.
NOT Gate (Inverter): Output is the inverse of the input, i.e. 1 if the
input is 0 and 0 if the input is 1.
NAND Gate: Output is the inverse of AND gate, i.e. 1 if both inputs are
not 1.
NOR Gate: Output is the inverse of OR gate, i.e. 1 if both inputs are not
1.
XOR Gate: Output is 1 if exactly one of the inputs is 1.
XNOR Gate: Output is the inverse of XOR gate, i.e. 1 if both inputs are
equal.
By combining these basic logic gates, more complex logic circuits can be
constructed to perform a variety of functions, such as arithmetic operations,
memory storage, and control logic.