O'Reilly logo

SAS Functions by Example, Second Edition, 2nd Edition by Ron Cody

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 16

Bitwise Logical Functions

 

Introduction

BNOT

BAND

BOR

BXOR

 

Introduction

I doubt you will find any routine uses for these bit manipulation functions in your everyday programming. However, they are fun, and I thought a short program demonstrating the four logical functions (AND, NOT, OR, exclusive OR) would be interesting. I left out the remaining two functions, which shift bits right or left. One reason I decided to include these four bitwise functions is that the exclusive OR function (BXOR) has applications in ciphers and I have long been interested in codes and ciphers.

This collection of functions performs logical operations on bit strings. As a quick review, recall that A AND B is true if both A and B are true; NOT A reverses ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required