Home arrow Perl Programming arrow Perl, Bit by Bit

Perl, Bit by Bit

When you program, you're usually doing it at some distance from the bits and bytes that your computer understands. There never seems to be a need to think about bits. But believe it or not, learning about bits can be to your advantage for certain programming purposes. Perl provides operators for working with bits that let you leverage this knowledge.

TABLE OF CONTENTS:
  1. Perl, Bit by Bit
  2. A bit of a need
  3. Representing binary numbers
  4. Operating on bits using bitwise operators
By: Peyton McCullough
Rating: starstarstarstarstar / 6
August 04, 2009

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

For many programmers, bits aren't an issue that receives any serious attention. Whenever someone mentions a bit, they get a vague idea of ones and zeros strung together, deep within the heart of a computer, at a level they don't have to work with or even think about. Creating a functioning program, or even a complex program, requires absolutely no knowledge of bits, and as a result, learning about bits is often a curiosity. Programmers can manipulate more complex and more abstract data structures, and these structures form the real meat of the program. With Perl and other similar scripting languages, this is especially true.

But bits are definitely worth learning and thinking about. Sometimes, a particular algorithm requires manipulating bits to work efficiently or at all, and other times, working with bits just makes problem solving a heck of a lot easier. Even in a language like Perl, this is still the case. In any case, it's good to have an understanding of data at a lower, more basic level, and learning about bits will provide just that.

In this article, we're going to take a look at working with bits and Perl. We'll look at the bitwise operators that Perl provides, along with some Perl functions that make bit manipulation easier. We'll also take a look at an application that requires bit manipulation in order to function.



 
 
>>> More Perl Programming Articles          >>> More By Peyton McCullough
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

PERL PROGRAMMING ARTICLES

- Perl Turns 25
- Lists and Arguments in Perl
- Variables and Arguments in Perl
- Understanding Scope and Packages in Perl
- Arguments and Return Values in Perl
- Invoking Perl Subroutines and Functions
- Subroutines and Functions in Perl
- Perl Basics: Writing and Debugging Programs
- Structure and Statements in Perl
- First Steps in Perl
- Completing Regular Expression Basics
- Modifiers, Boundaries, and Regular Expressio...
- Quantifiers and Other Regular Expression Bas...
- Parsing and Regular Expression Basics
- Hash Functions

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: