0

I’m trying to simulate left shift micro instruction in scpu-sim , using assembly language .

‘M about to multiply the value by 2^n , But I’m stuck in how to actually represent 2^n ?

shilovk
  • 11,718
  • 17
  • 75
  • 74
  • Have a look at [this](https://stackoverflow.com/questions/15916733/assembler-program-tasm-calculate-raise-m-to-the-power-of-n-mn) SO question. – Jeroen Heier Dec 19 '17 at 04:45
  • @JeroenHeier that's about power. Here the OP is asking about shifting. Moreover he didn't use x86 – phuclv Dec 19 '17 at 05:38
  • 1
    @Rota a left shift can be simulated by adding to itself. In C `x <<= 1` can be done by `x *= 2` or `x += x` – phuclv Dec 19 '17 at 05:39

0 Answers0