Assignment Activity Unit 4
Assignment Activity Unit 4
components: the adder, subtractor, multiplier, and divider. These are based on basic logic gates
and the rules of binary numbers, which form the basis for all digital technology.
Binary Adder
A binary adder performs addition on binary numbers. We use half-adders and full-adders:
A half-adder adds two binary digits and generates a sum and a carry output.
A full-adder adds three bits, including the carry-in, and generates a sum output and a
carry-out.
Using a series of full-adders, it is possible to design an n-bit binary adder called a ripple-carry
adder that can handle bigger binary numbers. A 4-bit adder, for example, has four full-adders
Binary Subtractor
Binary subtraction is carried out effectively using two's complement. The operation A - B is
Such a method makes it easy to reuse binary adders for performing subtraction (Patterson &
Hennessy, 2017).
Binary Multiplication
Multiply each bit of one operand by every bit of the other (AND operations).
Revise and include the initial results.
Adders and control logic to manage shifting and accumulation (Mano & Ciletti, 2017).
Binary divider
3. If the result is positive, set the quotient bit to 1; else, restore and set the quotient bit to 0.
It requires the use of subtractor logic, registers, and control mechanisms to enable progressive
In building the modules into a unified binary calculator, a modular design strategy is used
wherein each arithmetic operation is expressed as a separate entity that is attached to a control
center mechanism.
Architecture:
Control Unit: Decodes the operation and sends operands to the respective module.
ALU Core: Contains the addend, subtractor using two's complement, multiplier, and
division units.
Multiplexers: Used to choose the correct output based on the respective operation.
Registers: Hold inputs temporarily, intermediate results, and the final outcome.
Uniform input lines are shared by all modules, with control signals determining the final
outcome. When the operation code is "01," for example, the control unit activates the subtraction
Each arithmetic module produces results, which are fed into a multiplexer.
Binary Addition
1011
+ 0110
-----------
10001 (17)
Carry-out = 1; Sum = 0001. Result = 10001 (5-bit result).
Binary Subtraction
1001
+ 1100
--------
0101 (5)
Result = 0101 (5)
Binary Multiplication
0011
x 0101
--------
0011 (0011 x 1)
+ 000000 (shifted)
+ 001100 (0011 x 1 shifted two positions)
-------------------
= 0001111 (15)
Binary Division
Remainder = 0
Advantages
Simplicity: Binary uses only two states (0 and 1), simplifying hardware design.
Error Resistance: Binaries have a lesser tendency toward electrical interference and
error manifestation.
Compatibility: Binary logic aligns with digital circuit operation using transistors and
gates.
systems.
Obstacles
Length of Numbers: Binary numbers require more digits than decimal, increasing
memory usage.
Human Interpretation: Binary is less intuitive for humans, requiring translation for
understanding.
Overflow Handling: Care must be taken to manage overflow, especially in limited bit-
width systems.
Despite these challenges, binary arithmetic remains the underlying principle of computing due to
operations processed by computers. The project provides a way of actualizing numeral systems,
digital logic, and modular construction knowledge. It is a link between theory and praxis wherein
actual CPU operations could be simulated where arithmetic operations feature quite
instrumental within the fields of digital electronics, computer design, and embedded systems
This exercise further clarifies the concepts behind binary numbers by relating their
application to everyday life. It highlights the pivotal role that fundamental binary thinking plays
Harris, D. M., & Harris, S. L. (2012). Digital Design and Computer Architecture.
Morgan Kaufmann.
https://www.academia.edu/40117228/Digital_Design_and_Computer_Architecture
Mano, M. M., & Ciletti, M. D. (2017). Digital Design with an Introduction to the Verilog
%20an%20Introduction%20to%20the%20Verilog%20HDL,%20VHDL,%20and
%20SystemVerilog%20by%20M.%20Morris%20R.%20Mano%20%20Michael%20D.
%20Ciletti%20(z-lib.org).pdf
Patterson, D. A., & Hennessy, J. L. (2017). Computer Organization and Design: The
https://www.researchgate.net/publication/375598122_Computer_Organization_and_Desi
gn_The_Hardware_Software_Interface_by_David_A_Patterson_and_John_L_Hennessy