[Oberon] FPGA - ASR shift operator

Tomas Kral thomas.kral at email.cz
Mon May 1 21:38:12 CEST 2017


Aha, this looks like one's complement?
T.

On Mon, 1 May 2017 21:28:35 +0200
Jörg <joerg.straube at iaeth.ch> wrote:

> Ah I see.
> For bit manipulations I recommend making a drawing, where you try to
> understand how many bits have to be shifted left and right depending
> on "x" and "w".
> 
> Remind: for shift operations  this holds true   -(x MOD 32) = 32 - (x
> MOD 32)
> 
> Jörg
> 
> > Am 01.05.2017 um 19:49 schrieb Tomas Kral <thomas.kral at email.cz>:
> > 
> > Aha, 2^5 = 32, so I can shift max 32 bits around, that makes sense.
> > But I am also seeing this in the code, Display.Mod : CopyPattern.
> > 
> > ASR(pwd, -(x MOD 32))
> > 
> > and that I do not understand.
> > Tomas
> > 
> > 
> > On Mon, 1 May 2017 16:52:56 +0200
> > Tomas Kral <thomas.kral at email.cz> wrote:
> > 
> >> Hi,
> >> 
> >> Looking at shift operators (functions) on Oberon system code, I do
> >> not understand why ASR(m, -n) takes a negative argument?
> >> 
> >> Tomas
> >> 
> > 
> > 
> > 
> > -- 
> > Tomas Kral <thomas.kral at email.cz>
> > --
> > Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related
> > systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
> 
> --
> Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related
> systems https://lists.inf.ethz.ch/mailman/listinfo/oberon



-- 
Tomas Kral <thomas.kral at email.cz>


More information about the Oberon mailing list