News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHPMaster.com:
Base Converting and Binary Operators
April 18, 2013 @ 11:44:05

On PHPMaster.com there's a new tutorial from Timothy Boronczyk focusing on the binary operators in PHP and using them to do some base conversions.

This article discusses PHP's binary operators and how to convert between different counting systems. Most programming books and articles only dedicate a page or two to such topics, and although using the operators is really quite simple, there's a fair amount of background knowledge one must have to use them correctly. Instead of giving the same bare-bones treatment that every other reference gives, I'll first provide you the necessary background in number theory. Armed with that knowledge, you'll be able to understand the binary counting system and base conversions… and familiarity with binary digits is the key to successful use of the binary operators!

As promised he starts off with some number theory complete with illustrations about base-10 and how the values fit into "buckets" of data. He compares this to base-2 (binary) and only then starts getting into the conversion functions. He shows the usage of things like decbin and dechex to modify the values as well as the use of bitwise and binary operators.

0 comments voice your opinion now!
converting binary bitwise operator tutorial numbertheory

Link: http://phpmaster.com/base-converting-and-binary-operators

blog comments powered by Disqus

Similar Posts

Gonzalo Ayuso's Blog: Function decorators in PHP with PHPDoc and Annotations

PHPRiot.com: Zend Framework 101: Zend_Soap

IBM developerWorks: Starting to use ODBC with PHP

PHPImpact Blog: Building a Web Service Client using the Zend Framework

SitePoint PHP Blog: Drupal 8 Hooks and the Symfony Event Dispatcher


Community Events





Don't see your event here?
Let us know!


library voicesoftheelephpant list framework introduction release podcast deployment tips community series opinion bugfix interview package symfony laravel install language api

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework