Question regarding notation. Chapter 1. Page 16 Figure 1.6 a<.

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Question regarding notation. Chapter 1. Page 16 Figure 1.6 a<.

deltanull
Greetings,
There's notation I've never seen used in logic before. I'm hoping to get some clarification in regards to its usage.

/* Xor (exclusive or) gate:
If a<>b out=1 else out=0. */

What does a<>b mean ? I've never seen <> used before.


Thanks,
Reply | Threaded
Open this post in threaded view
|

Re: Question regarding notation. Chapter 1. Page 16 Figure 1.6 a<.

WBahn
Administrator
deltanull wrote
Greetings,
There's notation I've never seen used in logic before. I'm hoping to get some clarification in regards to its usage.

/* Xor (exclusive or) gate:
If a<>b out=1 else out=0. */

What does a<>b mean ? I've never seen <> used before.


Thanks,
Think of it as a relational operator. If you saw X >= Y you'd think if X is either greater than or equal to Y. Same notion. X <> Y means if X is either less than or greater than Y. A bit of thought will show that this is the same thing as X is not equal to Y. But in text we don't have the usual not-equal operator, so a bunch of different ones have crept up. Among them are '#', '!=", "/=", and '<>'.
Reply | Threaded
Open this post in threaded view
|

Re: Question regarding notation. Chapter 1. Page 16 Figure 1.6 a<.

deltanull
Thanks for the reply, makes sense.
I've never seen the octothorp used like that or <>.

Learn something new every day !
Reply | Threaded
Open this post in threaded view
|

Re: Question regarding notation. Chapter 1. Page 16 Figure 1.6 a<.

WBahn
Administrator
deltanull wrote
Thanks for the reply, makes sense.
I've never seen the octothorp used like that or <>.

Learn something new every day !
When you think about it, the '#' is very close to the traditional not-equals sign -- it just has one additional vertical slash. It also has the advantage of being a single character operator. BASIC used '<>'. I don't recall which language I've used that used '#'.

There are several other representations, as well.