[LinuxBIOS] Silly Question

joe at smittys.pointclark.net joe at smittys.pointclark.net
Mon Mar 26 21:20:05 CEST 2007


Quoting Alan Carvalho de Assis <acassis at gmail.com>:

> Hi Joe
>
> 2007/3/26, joe at smittys.pointclark.net <joe at smittys.pointclark.net>:
>> This is a silly question but, when I see something like this (2<<20)
>> in raminit.c it is saying to change bit 20 to a value of 2?? Is that
>> correct?? That would have to be a binary value than right? Than what
>> would that look like?? Just trying to understand the whole registry
>> setting thing better.
>>
>
> This is a shift operation, then you need think it in binary:
>
> 2 = 10 (binary)
>
> 10 << 20 = 1000000000000000000000
>
> This operation is just to set the 22th bit.
> This is equivalent to 1 << 21.
>
> More info read about shift operation:
>
> http://en.wikipedia.org/wiki/Arithmetic_shift
>
>> Thanks - Joe
>>
>
> Cheers,
>
> Alan


Thanks Alan. That makes perfect sense, I thought it was something like that.

Thanks - Joe





More information about the coreboot mailing list