[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Masking using Hexadecimal Values

From: Maynard Wright
Subject: Re: Masking using Hexadecimal Values
Date: Wed, 03 Aug 2016 16:22:19 -0700
User-agent: KMail/4.13.3 (Linux/3.16.0-30-generic; KDE/4.13.3; i686; ; )

On Wednesday, August 03, 2016 01:16:16 PM Chip Wachob wrote:
> Hello,
> I'm new to Octave, but I am trying to do some work where I need to mask off
> bits of a value.
> I've tried using bitand() but that only seems to return a binary value.
> The function seems to return either a 1 or 0 but what I am looking for is a
> function / command that will return the bit-wise and of two numbers.
> Eg:
> bitand (0x55AA, 0xF0F0) is currently producing a 0
> What command/function/code is required to have the statement yield 0x50A0?
> Thank you in advance for your time,

bitand(0x55AA, 0xF0F0) returns 20640 (hex 50A0) on my Octave implementation.   
I'm running Octave 3.8.1 under Kubuntu 14.04.

Maynard Wright

reply via email to

[Prev in Thread] Current Thread [Next in Thread]