# line of code.

Status
Not open for further replies.

#### electricity86

##### New Member
What does this line mean:

P0IFG = (HAL_KEY_P0INT_LOW_USED | HAL_KEY_POINT_HIGH_USED);

Where:
#define HAL_KEY_P0INT_LOW_USED 0
#define HAL_KEY_POINT_HIGH_USED 0

What will be inside P0IFG after that line, if before that line, his value was xxxxxxxx (eight 'x's).

Thanks.

Should be zeros!

Last edited:

#### electricity86

##### New Member
no, thanks.

So if HAL_KEY_POINT_HIGH_USED was equal 1,
Then the value of P0IFG
would be 0x0F?

##### Banned
0 OR 0 = 0
I'm not sure why you're having a problem with this question?

#### DirtyLude

##### Well-Known Member
I guess,

1. there's no such numeric value as 8 x's unless it was something like base 40 or something.

2. The pipe character '|' is a bitwise or operator in C. Google 'bitwise or' and you'll get an explanation of how it works.

##### Banned
In digital logic x's are commonly used to indicated an 'unknown' state.

#### Papabravo

##### Well-Known Member
no, thanks.

So if HAL_KEY_POINT_HIGH_USED was equal 1,
Then the value of P0IFG
would be 0x0F?
No it would be 1
as in 0x01 | 0x00 = 0x01
all day every day

Status
Not open for further replies.