Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Can ALU Input be register?

  1. Mar 1, 2017 #1
    In CPU ALU (arithmetic logic unit ) has two input.
    If one of the input has following Input LDA #23 this input will be stored in eax register.
    mov eax, 23d
    when do i need to use 2 of these input? Can any of this input be a Register ?
    Last edited: Mar 1, 2017
  2. jcsd
  3. Mar 2, 2017 #2
    If you talk about eax, I suppose you're talking about an intel 80386 or a successor. With this processor you can use a register, memory or an immediate operand for both operands of the alu, or for the destination. but only one memory operand for each instruction.
    you can do: add eax, 117 or add ecx, ebx or add eax, [esi] or add [memory_address],12
    but not add [memory_address1],[memory_address2]
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted