O'Reilly logo

JavaScript Recipes: A Problem-Solution Approach by Keith Cirkel, Russ Ferguson

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

© Russ Ferguson and Keith Cirkel 2017
Russ Ferguson and Keith CirkelJavaScript Recipes10.1007/978-1-4302-6107-0_5

5. Working with Bitwise Operations Against 32-Bit Integers

Russ Ferguson and Keith Cirkel2
(1)
Ocean, New Jersey, USA
(2)
London, UK
 

What Are 32-Bit Integers?

Problem

You want to be able to determine the difference between a 32-bit integer and another numeric value (such as the default number—64-bit floating point).

Solution

A 32-bit integer is vastly different from a variable bit floating-point number, which is the standard type of number in JavaScript. 32-bit integers can only be created using bitwise operators , which will be covered all throughout this chapter.

The Code

3.141; // Standard variable bit Number literal
0b; // 4, the same ...

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