Integer
An integer is a whole number with no fractional part, including negative numbers, zero, and positive numbers.
Python Workout, Second Edition
An integer is a whole-number numeric value without a fractional part, represented in Python by the int type.
- How it is used
- Uses integers for whole-number input, random values, comparisons, indexes, counters, and numeric calculations.
- How deep it goes
- Defines int and practices conversion, comparison, bases, and validation, but stops short of integer implementation internals.
- Examples
- Practices integers through a number-guessing game, run-time accumulation, hexadecimal conversion, and summing or averaging exercises.
- What you can do after
- Build integer-driven programs that parse input, compare values, generate random numbers, and accumulate numeric results.
Python Workout: 50 ten-minute exercises
An integer is a Python numeric value representing a whole number without a fractional component.
- How it is used
- Uses integers for guesses, indexes, counts, conversions, calculations, and exact small-unit representations.
- How deep it goes
- Explains definition, conversion, comparison, validation, inclusive random ranges, and practical precision choices without covering integer internals.
- Examples
- Demonstrates guessing games, cents-based money, filtered numeric text, and file lines containing integer values.
- What you can do after
- Build it from scratch by converting input, generating integer ranges, comparing values, validating failures, and accumulating integer data.
Read how Python Workout: 50 ten-minute exercises explains integer →
Modern C, Third Edition
An integer type is a C type whose values represent whole numbers, with either signed or unsigned representation.
- How it is used
- Represents whole-number values while making range, signedness and arithmetic behavior relevant to C expressions and data layout.
- How deep it goes
- Explains type classes, promotions, literal typing and signed representation; treats integer bit-fields as a further storage application.
- Examples
- Contrasts decimal and hexadecimal literal types, tabulates negation results, and uses time components to illustrate bit-field widths.
- What you can do after
- Evaluate/understand how C chooses integer literal types and when signedness or width changes the meaning of a value.
Get Programming: Learn to code with Python
int is Python's built-in type and constructor for representing or converting values to integers.
- How it is used
- Represents whole-number values for arithmetic, type conversion, and calculations involving minutes or user input.
- How deep it goes
- Defines int, demonstrates arithmetic and several conversions, and works through extracting whole hours; does not examine integer storage internals.
- Examples
- Uses 123-minute conversion, a user-entered number squared, and integer-controlled string repetition.
- What you can do after
- Apply it via Python’s int() to convert numeric input and extract whole hours from a division result.
Read how Get Programming: Learn to code with Python explains integer →
Modern C
signed int is a C signed integer type capable of representing both negative and nonnegative integer values.
- How it is used
- Distinguishes signed integer values and arithmetic from their unsigned counterparts when choosing types and interpreting expressions.
- How deep it goes
- Explains type ranks, promotions, literal typing, and sign representations; raises arithmetic overflow as a separate implementation question.
- Examples
- Compares decimal and hexadecimal constants and works through a 16-bit int range where -32768 has type signed long.
- What you can do after
- Evaluate/understand the type of integer constants and why negation or promotion may give an expression an unexpected type.
Learn Rust in a Month of Lunches
An integer is a whole-number numeric value without a fractional part.
- How it is used
- Represents whole numbers in Rust and guides choices about signedness, bit width, and variable types.
- How deep it goes
- Explains signedness, bit widths, binary, and type inference, but does not develop integer arithmetic.
- Examples
- Shows signed values, u8 and u16 limits, annotated and suffixed literals, and a rejected i32-to-char cast.
- What you can do after
- Apply it in Rust by choosing signedness and bit width, accepting inferred i32, or specifying another integer type.
Read how Learn Rust in a Month of Lunches explains integer →
Go in Action, Second Edition
An integer type represents whole-number values without a fractional component.
- How it is used
- Uses integers for arithmetic, array and slice indices, and standard-library function arguments.
- How deep it goes
- Explains signedness, widths, literals, and unsigned wraparound; recommends benchmarking rather than supplying performance measurements.
- Examples
- Demonstrates equivalent literals in several bases, unsigned underflow, and rejection of a negative configuration value.
- What you can do after
- Practice/perform it: choose int by default, select int64 when its range is needed, and validate negative input before unsigned conversion.
Learn PowerShell in a Month of Lunches: Fourth Edition, Covers Windows, Linux, and macOS
An integer is a whole number with no fractional or decimal portion.
- How it is used
- Clarifies numeric parameter requirements and prevents text input from producing incorrect PowerShell arithmetic.
- How deep it goes
- Defines whole numbers and demonstrates typed input, runtime inspection, arithmetic, command arguments, and conversion failures.
- Examples
- Demonstrates Read-Host input, [int] variables, multiplication, conversion errors, Get-Member inspection, and Get-Process -Id.
- What you can do after
- Apply it via PowerShell by declaring numeric variables, validating their runtime type, performing arithmetic, and supplying command identifiers.
Python How-To
int is Python's built-in numeric type for representing integers and the callable that constructs such values.
- How it is used
- Converts integer-valued strings into numbers for calculations, comparisons, and subsequent processing.
- How deep it goes
- Explains integer-string conversion, failed casts, and exception handling, without detailing int internals.
- Examples
- Uses positive and negative integer strings, age comparisons, and task urgency records, including malformed input.
- What you can do after
- Apply it via the int constructor to convert integer strings and handle invalid input with try...except.
The Quick Python Book, Fourth Edition
An integer is a whole-number value with no fractional component and, in Python, arbitrary magnitude subject to available memory.
- How it is used
- Uses integers for whole-number values and demonstrates their arithmetic and conversion in Python.
- How deep it goes
- Defines integer range, arithmetic result types, division, and conversions, including string parsing with an optional base.
- Examples
- Demonstrates integer arithmetic, large values, input conversion, and parsing strings in bases 2, 8, and 16.
- What you can do after
- Apply integer arithmetic, select division behavior, and convert input or numeric strings with Python’s int().
Read how The Quick Python Book, Fourth Edition explains integer →
Rust in Action: Systems programming concepts and techniques
An integer is a whole-number value without a fractional component.
- How it is used
- Uses integers for numeric operations, counters, and simple satellite identifiers.
- How deep it goes
- Explains literals, widths, bit patterns, and overflow through runnable examples rather than a comprehensive numeric-type reference.
- Examples
- Uses base-prefixed literals, a `u16` incrementing loop, and integer IDs passed to a satellite status function.
- What you can do after
- Diagnose/debug integer overflow and choose types whose ranges accommodate expected values.
Read how Rust in Action: Systems programming concepts and techniques explains integer →
Julia as a Second Language
An integer is a whole number with no fractional component, including positive, negative, and zero values.
- How it is used
- Uses integers for calculator-style arithmetic and as a foundation for understanding Julia’s numerical types.
- How deep it goes
- Explains type ranges, conversion, overflow, division, rounding, and formats; defers broader number-type and overflow background.
- Examples
- Demonstrates typeof(1), Int8(42), UInt8(256), div(5, 2), rem(5, 2), and integer rounding in the REPL.
- What you can do after
- Apply it via Julia’s type constructors, range-checking functions, div, rem, and rounding functions to choose suitable integer results.
Clojure: The Essential Reference
The int type is a fixed-width signed integer type representing whole-number values in the Java numeric type system.
- How it is used
- Deploys fixed-width integer arithmetic for hashing, image processing, coordinates, and other algorithms requiring int behavior.
- How deep it goes
- Defines 32-bit bounds, two’s-complement rollover, operator arities, casting, return types, and worked algorithmic uses.
- Examples
- Demonstrates typed addition, boundary rollover, line drawing, pixel coordinates, and Java int-array painting.
- What you can do after
- Apply unchecked-*-int operators to implement fixed-width arithmetic and integer-based algorithms with explicit overflow behavior.
Read how Clojure: The Essential Reference explains integer →
The Well-Grounded Rubyist, Fourth Edition
Integer is Ruby's built-in class for representing whole-number values.
- How it is used
- Represents single whole-number values and supports arithmetic within Ruby’s scalar-object model.
- How deep it goes
- Explains object membership, arithmetic behavior, numeric bases, conversion, and operator methods through evaluated examples.
- Examples
- Uses arithmetic tables, hexadecimal and octal literals, base conversions, ASCII conversion, and a temperature converter.
- What you can do after
- Evaluate whole-number expressions, choose integer or floating-point division, and write simple integer-based Ruby programs.
Read how The Well-Grounded Rubyist, Fourth Edition explains integer →
PostgreSQL Mistakes and How to Avoid Them
An integer data type represents whole-number values without a fractional component.
- How it is used
- Uses integers for whole-number data while warning that arithmetic and migration mappings can silently produce incorrect results.
- How deep it goes
- Explains truncating division, implicit casting, zero-divisor safeguards, and cross-database mapping consequences.
- Examples
- Demonstrates order percentages, pg_typeof(), explicit casts, division-by-zero queries, NULLIF, and COALESCE.
- What you can do after
- Diagnose integer arithmetic with pg_typeof(), cast operands, calculate fractional results, and prevent division-by-zero failures.
Read how PostgreSQL Mistakes and How to Avoid Them explains integer →
Related concepts
- number typekind of · A number type is a programming-language or data-system type whose values represent numeric quantities and support defined numerical operations.
- data conversionused by · Data conversion is the transformation of a value or data from one type, format, or representation to another, explicitly or implicitly.
- int32includes · An int32 is a signed integer type represented using exactly 32 bits.
- atomic typeuses · An atomic type is a type whose supported accesses and operations are indivisible with respect to concurrent execution and provide defined synchronization semantics.
- byte typecontrasts with · A byte type is a fixed-width integer type occupying eight bits, with signedness and numeric range determined by the language.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.














