Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
πŸš€ Try FlipJump in your browser: fj.tomhe.app
FlipJump Docs
FlipJump Docs
  • Getting Started
    • Installation
    • Hello, World!
    • Anatomy of a FlipJump program
  • Cookbook
    • Hello, World!
    • Echo a byte
    • Print a number in decimal
    • Conditional branches
    • Loop N times
    • Read, transform, print
    • Swap two variables
    • Add two numbers
    • Call a function
    • Define and print a string variable
  • Language Reference
    • The FlipJump Instruction
    • Lexical Structure
    • Expressions
    • Macros
    • Namespaces
    • Directives
    • Types and built-in names
    • Input / Output
    • Pointers, stacks & functions
    • Complexity notation
  • Standard Library
    • runlib.fj
    • casting.fj
    • ptrlib.fj
    • bit β€” namespace overview
      • bit/memory.fj
      • bit/logics.fj
      • bit/cond_jumps.fj
      • bit/shifts.fj
      • bit/math.fj
      • bit/input.fj
      • bit/output.fj
      • bit/casting.fj
      • bit/pointers.fj
      • bit/mul.fj
      • bit/div.fj
    • hex β€” namespace overview
      • hex/memory.fj
      • hex/logics.fj
      • hex/math.fj
      • hex/math_basic.fj
      • hex/shifts.fj
      • hex/cond_jumps.fj
      • hex/tables_init.fj
      • hex/input.fj
      • hex/output.fj
      • hex/mul.fj
      • hex/div.fj
      • hex/strings.fj
      • hex.pointers β€” namespace overview
        • hex/pointers/basic_pointers.fj
        • hex/pointers/xor_to_pointer.fj
        • hex/pointers/xor_from_pointer.fj
        • hex/pointers/read_pointers.fj
        • hex/pointers/write_pointers.fj
        • hex/pointers/stack.fj
        • hex/pointers/pointer_arithmetics.fj
    • All macros β€” alphabetical index
  • Reference
    • FlipJump in 5 minutes
    • The fj command-line tool
    • The .fjm binary format
    • Glossary
    • How the STL works
  • Examples
    • Hello World
    • Prime Sieve
    • Calculator
    • Quine
  • Companion tools and resources
    • FlipJump IDE β€” fj.tomhe.app
    • c2fj β€” C to FlipJump
    • FlipJump Claude Skill
    • Editor syntax highlighting & navigation β€” VS Code & JetBrains
    • Ghidra extension β€” reverse-engineer .fjm binaries
    • bf2fj β€” Brainfuck to FlipJump
    • flip-jump β€” the upstream language repo
    • esolangs.org β€” the canonical external reference
Back to top
View this page
Edit this page

bit/math.fjΒΆ

β€”β€”β€”- Arithmetical Macros carry is both input and output

View source on GitHub

MacrosΒΆ

bitΒΆ

  • bit.inc1 β€” {carry:dst}++

  • bit.inc β€” x[:n]++

  • bit.dec β€” x[:n]--

  • bit.neg β€” x[:n] = -x[:n]

  • bit.add1 β€” {carry:dst} += src

  • bit.add β€” dst[:n] += src[:n]

  • bit.sub β€” dst[:n] -= src[:n]

bit.incΒΆ

  • bit.inc.inc1_with_carry0_jump β€” {carry:dst}++

Next
bit/input.fj
Previous
bit/shifts.fj
Copyright © 2026, Tom Herman
Made with Sphinx and @pradyunsg's Furo
On this page
  • bit/math.fj
    • Macros
      • bit
      • bit.inc