Questions tagged [alu]

ALU is the acronym for arithmetic and logic unit. This circuit performs arithmetic and logic operations in a processor.

Filter by
Sorted by
Tagged with
1
vote
1answer
97 views

I have a problem with understanding the attached ALU (6 control bits)

I have an Arithmetic Logic Unit, as shown below (I also included a CircuitJS simulation of it, so it will be much easier to understand the inner working of said ALU). ‘x’ and ‘y’ are the 4-bit input ...
0
votes
2answers
71 views

Buses and the ALU in the 8086

Intel's 8086 manual shows the following diagram for the CPU's architecture (in page 2-5): If I understand correctly, the ALU's two operands and result are retrieved from / sent to the same 16-bit bus....
28
votes
9answers
3k views

What is the process of going from machine code to electrically controlling individual transistors? [closed]

For someone who writes software but doesn't have a computer engineering background, the dozens of abstraction layers have always bewildered me. I know all source code in their most fundamental level ...
0
votes
2answers
66 views

4 Channel NOT and AND Gate Symbols

I am designing an ALU for my computer architecture class. The rubric states that we need to simplify each logical part to make it as clear as possible. My group condensed the 4 NOT gates and 4 AND ...
1
vote
2answers
184 views

How many ALUs (and threads) are in a Pentium CPU?

I'm reading a book bottom up where it said: The Arithmetic Logic Unit (ALU) is the heart of the CPU operation. It takes values in registers and performs any of the multitude of operations the ...
0
votes
1answer
51 views

Designing a Carry lookahead unit using EEPROMs, creates osclillator

I have read something about CLUs (Carry lookahead units) and want to build one. I have settled on design using eeproms as adders ...
0
votes
3answers
122 views

when and how is the machine language (binary stream) mapped to an existing instruction?

I'm trying to better understand the entire process of coding, which involves translating the higher level languages (c++/java/python and so on) into binary data that tells the CPU to execute ...
35
votes
6answers
6k views

Why does Intel's Haswell chip allow floating point multiplication to be twice as fast as addition?

I was reading this very interesting question on Stack Overflow: Is integer multiplication really done at the same speed as addition on a modern CPU? One of the comments said: "It's worth nothing ...
4
votes
1answer
148 views

Microprocessor architecture bits vs bus sizes

I am ready following on this website: "Another big difference between 32-bit processors and 64-bit processors is the maximum amount of memory (RAM) that is supported. 32-bit computers support a ...
0
votes
1answer
43 views

Choosing the best approach for data selection in a datapath

For a university project, I have to design and construct a very simple CPU including the ALU. In order to select between different data lines that go into the ALU(32-bit data line), I have thought of ...
0
votes
2answers
72 views

How does a computer know when to “get” the output from the ALU?

Basically what the title says, I guess I've got some sort of misconception or somthing probably. The ALU can have, say, a ripple carry adder which doesn't produce its entire output all at the same ...
0
votes
1answer
114 views

ALU Design in verilog HDL

Below is my code for ALU which instantiates a 4:1 MUX and a 32 bit squarer modules. The port connections can be seen in module instantiations. However it is important to mention here that input of MUX'...
0
votes
1answer
66 views

Parallel Prefix Adder explained

I think I have understood Carry Lookahead adders. However, I don't really understand how parallel prefix adders evolve from carry lookaheads. Can someone explain to me the difference between PPA and ...
0
votes
0answers
93 views

ALU not working in Verilog MIPS Single cycle implementation

I have written the following code in Verilog which for the time being caters to only a subset of R-type, load word and store word instructions in the single cycle implementation based on the diagram ...
-1
votes
1answer
95 views

Designing a 2-bit ALU [closed]

I want to design a 2-bit ALU that does XOR, OR, AND, and addition. With help of Wikipedia: I designed this: However, it's not working. I tried connecting the controllers to S0, S1, S2 but no ...
-1
votes
3answers
235 views

Why does a full adder need an OR gate?

I have read and I understand how the full adder works (or atleast I think I do :D). It combines two half adders and either one of them can have a carry over, hence the OR gate. But why do we need ...
0
votes
1answer
40 views

Do binary numbers move in sequence ones and zeros or parallel at once to ALU for addition?

Do binary numbers move in sequence ones and zeros or parallel at once to ALU for addition, I mean ones and zeros in sequence vertically to ALU or parallel horizontally AT ONCE?
0
votes
2answers
236 views

How to get the MSB into a logic gate which will check if a number is negative or not?

I need to create a logic gate which will find out whether a number is negative or not. The input is 8 bits and the output is 1 bit, and if the input is 1 (i.e. negative number) then the output ...
0
votes
1answer
483 views

How to find out if the input of a logic gate is negative in two's complement?

I'm trying to create something which will output whether the input of the logic gate is a negative number or not in two's complement. I understand how twos complement works etc, but i'm not entirely ...
0
votes
3answers
179 views

How to find out if a binary number is zero or not using logic gates?

I'm trying to put some logic gates together which would perform a task of finding out whether a number is zero or not. I came across a thread like this on here already (How to find out if a binary ...
1
vote
2answers
239 views

How to use comparator functions of 74LS181?

I'm experimenting with the 74LS181 ALU (see here if you like), and it is going well, but I am unable to figure out how to use the A=B, A>B, and A<B comparator functions. The datasheet states, "...
0
votes
2answers
108 views

Are floating point numbers denormalised before the processor performs arithmetic operations on them? [closed]

Does the processor denormalise the numbers in IEEE 754 notation and normalise the result after storing or are the arithmetic operations performed on the numbers as they are? I'm asking because in case ...
0
votes
2answers
249 views

What is the True Pinout and Function of the 74ls181 in both of its modes (Active High and Active Low)?

I've found several datasheets for the 74ls181 with pinout and function diagrams as pictured below. This from Jameco (where I bought mine): https://www.jameco.com/Jameco/Products/ProdDS/46973.pdf ...
1
vote
2answers
195 views

Bus tapping in Xilinx ISE for 8 bit to 16 bit conversion

I have a processing unit which is controlled by a sequencer/control unit. The agenda of this processing unit is to multiply 2 numbers using 8 BIT registers using the bit shift and add method. Once ...
0
votes
0answers
15 views

Rom.txt in quartus prime [duplicate]

What is rom.txt in quartus prime? What does it do? How do you change it and implement?I’m building a 8 bit alu. Thanks
0
votes
1answer
497 views

Design on ALU in multisim

I am trying to design a simple 2 bit ALU which can perform addition, OR and XOR. Here's the picture of my design in multisim. Problem with my design is i'm not understanding the purpose of select ...
1
vote
1answer
94 views

SN74LS181: The comparison function, A=B, not operating

I have six SN74LS181N-B circuits for arithmetic functions. I intend to utilise the A=B output, which is the comparison function. Sources have indicated that this function operates, if subtraction is ...
0
votes
1answer
139 views

Need help understanding the status output generation of an ALU

I'm currently trying to implement a simple processor using Verilog in a FPGA. I'm using Mic - 1 architecture as a reference model. The thing I can't understand is the ALU is generating a "status" ...
1
vote
2answers
176 views

Why is the inverter need in this ALU?

I'm studying computer architecture and I wonder why the inverter is needed in this ALU?
0
votes
1answer
191 views

Design of Arithmetic Section

While going through topic on ALU design. I came across the point.i.e Design of Arithmetic Section .But what confused me is what is it's purpose in ALU. I'm thinking it in terms of performing basic ...
3
votes
1answer
201 views

Why would ALU Output be Asynchronous with Input Change?

Wikipedia states "An ALU is a combinational logic circuit, meaning that its outputs will change asynchronously in response to input changes." But, the definition of a combinational logic circuit is: "...
5
votes
5answers
299 views

Why are ALUs still serial?

One of the most common optimizations used in modern processors is to keep the silicon as busy as possible. Cache units access memory for the processor so other circuitry isn't tied up for the dozens ...
0
votes
1answer
507 views

Why is the output to this 74181 ALU circuit always on?

I recently built an ALU circuit using the 74181 4 bit ALU. The circuit I built is below: simulate this circuit – Schematic created using CircuitLab Please note that the pinout in the ...
0
votes
1answer
676 views

2 x 74LS181 4 bit ALU's cascaded to form 8 bit ALU, Cin problem?

When trying to add two numbers on my two cascaded 74LS181's I find that the result seems to be right when I tie the carry (Cn) of the least significant one to Vcc, contra my expectation that Cn should ...
0
votes
4answers
1k views

74181 ALU not working properly cascaded to add 8 bit numbers

I'm trying to make a homebrew CPU but having problems with the 74LS181 ALU, which I'm simulating in Logisim software before diving into real ICs and breadboards. I've cascaded two 74181 following ...
1
vote
1answer
146 views

In an ALU, is every function calcuated simultaneously?

I'm designing a 4 bit ALU as a project. I have circuits that can calculate addition, subtraction and bitwise logic operations - my question is, do I tie A & B (4 bit inputs) to every circuit that ...
4
votes
1answer
1k views

Why don’t most RISC ISAs write integer MULH/MUL or DIV/REM to two general-purpose registers? [closed]

Most hardware multiplication and division algorithms can compute the high and low words of a product of two integers, or both the quotient and remainder of the division of two integers, at the same ...
-1
votes
1answer
2k views

How to create Verilog or VHDL from a Quartus design

I have done a Quartus design from logical primitives for FPGA. Now I would like to see the corresponding Verilog or VHDL if feasible. Is that possible with Quartus and if so, how?
0
votes
2answers
3k views

ALU carry in/out

Say there is an ALU with 3 inputs (A, B, Cin) and 2 outputs (Res, Cout). It has functions [A plus B, A minus B, B minus A, A or B, 0, 1]. From my understanding, this is how the carry-in/out work for ...
11
votes
3answers
1k views

does 8085 CPU have an extra register within ALU?

From the 8085 CPU architecture, when ALU done calculation, the result is clocked back to accumulator A on next clock edge. But accumulator A is directly wired as ALU input, what if the clock edge didn'...
2
votes
2answers
3k views

Which register holds the final arithmetic and logic results?

This Wikipedia page says an accumulator is a register in which intermediate arithmetic and logic results are stored. So which register holds the final result?
1
vote
4answers
845 views

Replace ALU With Lookup Table? [closed]

Disclaimer: So this is obviously a silly question and I want to start by saying I don't want to discuss the financial costs of this, as I'm aware CPU cache is expensive. As this hasn't been made ...
0
votes
1answer
144 views

Multiple data bit widths in a 4 bit adder?

So I am learning digital logic and have learned how to create an adder and have come across this question. So I am creating a 4 bit adder. To create the 4 bit adder I just make one 1 bit full adder ...
0
votes
0answers
504 views

Calculating MIPs

Im working on the following question: I got the following answer is it correct? a) The total time = 10ns + 10ns +10ns = 30ns To calculate MIPS, divide one second by 30ns. MIPS = (1 x 10^9)/30 = 33,...
1
vote
1answer
521 views

What is “formal verification” of hardware?

I read that testing and verification are different but in what way? I read that somebody writes theory to prove that the hardware is "correct" but how is that done? I tried reading Wikipedia and ...
-1
votes
2answers
111 views

Improving Verilog Code

I've written an 8-bit shifter in verilog ...
0
votes
1answer
314 views

Use 3-8 MUX instead of Case statement [closed]

I've been thinking about implementing a very simple ALU, and came across this link Verilog 8 Bit ALU. This seems to be a very naive and abstract but intuitive implementation. I'm thinking about ...
1
vote
2answers
177 views

ALU,RAM and ROM test for LPC 1778

Im working on a non safety project and as part of the Initialization tests I wanted to check the internal memory of LPC1778 for proper functionality before beginning the application. I dont intend to ...
0
votes
1answer
246 views

Adding BGTZ to One-Cycle MIPS CPU

I'm trying to add the MIPS assembly command BGTZ to the following circuit: I know that BGTZ takes the register value and sees if it's greater than 0. If it's greater it branches to the target. Can I ...
0
votes
4answers
829 views

How does a computer deal with subtraction of 2 values that are in two's complement?

I'm confused how the computer calculates if there are two values A and B, both are in two's complement. Now we want do the ...