© Russ Ferguson and Keith Cirkel 2017

Russ Ferguson and Keith Cirkel, JavaScript Recipes, 10.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

Listing 5-1. Examples of 32-Bit Integers
3.141; // Standard variable ...

Get JavaScript Recipes: A Problem-Solution Approach now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.