Questions tagged [alu]

ALU stands for Arithmetic Logic Unit, that performs arithmetic and logical operations for computer systems.

188 questions
1
vote
1 answer

n-bit ALU in scheme

I'm making n-bit ALU in scheme and I have a 1-bit ALU so far. Can someone tell me how to approach this problem? Here are the instructions for it: The format of the procedure is (ALUn selection x1 x2 n) where the first parameter,…
Regina
  • 11
  • 2
0
votes
3 answers

Best Option for Calculating Logical Equation?

So, I'm making a Hack CPU emulator, and I was wondering what the best way to calculate the output was. Would condensing the output calculations into one unreadable line be more efficient than calculating the result one step at a time? Does the…
Publius
  • 1,184
  • 2
  • 10
  • 27
0
votes
2 answers

VHDL ALU undefined value

I'm learning VHDL for programming a FPGA, basic (but hard-for-me) projects. I have this ALU. It is supossed to be a 4-bit ALU. But when I want to make the Add operation the value of result is UUUU. For all other operations is working fine. Any…
BRabbit27
  • 6,333
  • 17
  • 90
  • 161
0
votes
1 answer

Nand2Tetris: How to code 16-bit constant in ALU

I'm doing ALU task in Project 2 in Nand2Tetris course. // and operates on the resulting values, as follows: // if (zx == 1) set x = 0 // 16-bit constant // if (nx == 1) set x = !x // bitwise not // if (zy == 1) set y = 0 //…
0
votes
2 answers

Can execution units belong to same port work simultaneously?

According to Intel Skylake architecture figure, one port can be linked with multiple execution units. Can these units work simultaneously? For example, if an "integer vector multiplication instruction" is launched from port0, it will use the "Vect…
0
votes
0 answers

16 Bits ALU in MIPS

Here is the code I implement this code in PCSpim ## Two 16 bits value is assigned in data segment ## Provide Selector value in console window ## Result is displayed .text .globl main main: la $s1, value lb $t1, 0($s1) lb $t2,…
Rocky
  • 17
  • 4
0
votes
2 answers

Cannot convert type STD_Logic to type unsigned

&I am trying to create the logic for unsigned addition in the ALU of a 32-bit MIPS single cycle processor but keep getting this error: cannot convert type logic to type unsigned This is what I have so far (Feel free to look through it,I feel like…
0
votes
0 answers

What is type of shift ALU perform?

Does the ALU perform an arithmetic or a logical shift(Right)? am asking about signed number for example -128 shift right is -64 or 64 ? What is type of shift does ALU perform?
user20838401
0
votes
2 answers

System Verilog - How to only take the top half of the bits from the result of a signed integer product

I am programming a basic ALU in system verilog. The ALU takes inputs from the 16 bit registers InDest and InSrc and outputs the result to the 16 bit register OutDest. One of the required instructions is MUH, which sets the value of register OutDest…
Xavier
  • 3
  • 3
0
votes
0 answers

how do i get the first bit of a 16bit number using a logic gate simulator?

I am currently building an Alu computer component in Logical Circuit simulator. I want to check if the result i get from the Alu (a 16 bit number) is positive or negative, I know i need to use the two's complement (in whice the most significant bit…
romi
  • 11
  • 2
0
votes
0 answers

memory whose size is larger than the available size in an instruction

Hello All I hope you are fine , Please i have 2 Questions if the ISA is 16 bits and Ram is 8 bit only for one address what will happen? If My ram is 16 bits and ISA 16 bits the featch will get 16 bits and proccess 16 bits int the proccessor? Thank…
0
votes
1 answer

Effective time complexity for n bit addition and multiplication

I have done a course on Computer Architecture and it was mentioned that on the most efficient processors with n bit architecture word size the addition/subtraction of two words has a time complexity of O(log n) while multiplication/division has a…
0
votes
1 answer

How to write ALU control lines?

I know logical ADD in binary is 0010, and logical AND in binary is 0000. How do I go from this to a full operation?
aflo7
  • 58
  • 5
0
votes
1 answer

alutLoadMemoryFromFile invocation error

This is part of a function that loads sound for my sprite game made in C# and Tao. int format; float frequency; int size; IntPtr data = Alut.alutLoadMemoryFromFile(path, out format, out size, out frequency); System.Diagnostics.Debug.Assert(data…
pokoko222
  • 57
  • 1
  • 3
0
votes
0 answers

How does x86 ALU instructions access memory for fetching operands?

Recently I am learning assembly but having hard time understanding it. There was question whether x86 ALU instructions directly access memory for fetching operands, but I have no idea if it is directly accessing memory or indirectly accessing the…
chae yeon
  • 33
  • 6