DeFi & DEX

ProgrammingbitcoinLearn Bitcoin Script on Windows

A free, open-source book on how Bitcoin Script works. Learn what it covers, how to install it safely on Windows, and why it has not been updated since 2020.

Free Open source Windows: Yes Updated 4 Dec 2020
8 min read Last update 4 Dec 2020 github.com/jimmysong/programmingbitcoin

Programmingbitcoin is a free, open-source educational book about how Bitcoin Script works. It is written for developers, students and anyone who wants to understand what happens inside a Bitcoin transaction. Our catalog files it under DeFi & DEX, but it does not trade, swap or hold funds. It is a learning resource that can be installed on Windows.

Keep one caveat in mind before you start. The project has had no code updates since December 2020, so the text and example code are a fixed snapshot rather than a maintained product. The core ideas of Script change slowly, which is why the material still has value for reading and practice. Just do not expect fixes, new features or updates for recent Bitcoin changes.

02

What Is Programmingbitcoin and Who Is It For?

Programmingbitcoin is a long-form text written by Jimmy Song, with example code kept in a public GitHub repository. Its subject is one narrow part of Bitcoin: the scripting language that decides whether a transaction is allowed to spend its coins. Most users never see this layer, but developers, security reviewers and curious students rely on it every day.

The book suits readers who already want to write or read code and who are comfortable with the idea of a stack-based language. It is less useful for someone looking for a price tracker, a wallet or a trading tool. If you want to understand why Bitcoin transactions look the way they do, this is the right kind of resource.

Because the project is an educational text, its value lies in explanation rather than in features you can click through. Read the chapters in order, run the examples and write small variations of your own. That practice matters more than the specific version of any file.

03

How Bitcoin Script Works Under the Hood

Bitcoin uses a small scripting language that is not general-purpose. Each transaction output carries a locking script, and a spending transaction supplies an unlocking script. The network combines the two and runs the result. If the final stack state is valid, the coins can move.

The language is deliberately limited. It has no unrestricted loops and cannot run arbitrary programs, which keeps verification predictable for every node. That tradeoff is one reason why the standard patterns are so important: they are the agreed shapes that wallets and services use most often.

Understanding these basics helps you read real transactions. When you see a script in a block explorer, you can identify the pattern, guess what it is trying to prove and spot anything unusual. The book builds exactly this reading skill.

04

Practical Scenarios for Studying Bitcoin Script

A common scenario is a developer who builds a wallet feature and needs to know exactly how outputs are locked. Reading the chapters on standard scripts gives a clear map of the forms they will meet. The example code then lets them check their assumptions before touching real funds.

Another scenario is a security-minded engineer reviewing a transaction-related tool. Knowing how script fields are parsed helps them spot malformed inputs and understand what a validating node will reject. The explanation of why pay-to-public-key had weaknesses is especially useful for reviewers.

A third group is students in a university course or self-taught programmers preparing for protocol discussions. For them, the book works as a structured textbook. The best approach is to read a chapter, reproduce its examples in a scratch environment, and then change one element to see what happens.

05

Key features

Script Fundamentals

The book walks through how Bitcoin Script runs, one operation at a time. Readers see how values move through the stack and how a script reaches a final yes-or-no result during validation. The approach is practical and rooted in worked examples.

Parsing and Combining Script Fields

A dedicated section shows how a script is broken into its fields and how those fields are put back together. This helps readers understand the exact structure that nodes check when they validate a transaction. Seeing the pieces separately makes the format easier to follow.

Standard Script Types

The guide covers the standard script patterns used on the network, starting with the pay-to-public-key form. It explains why that form caused problems and how the pay-to-public-key-hash form addressed them. The comparison is a clear lesson in protocol design.

Building Custom Scripts

Beyond the standard patterns, the material explains that scripts can be assembled in many ways within the rules of the language. Readers learn to reason about what a custom script allows and what it rejects. This is the main skill the book aims to build.
06

Supported coins

The book's documentation focuses on Bitcoin (BTC), and its examples are built around Bitcoin scripts. It does not cover other coins or networks.

07

How to install Programmingbitcoin on Windows

  1. 1

    Choose the Official Source

    Open the project's GitHub repository and go to the Releases page to see whether a Windows build or installer is offered. You can also use the official project pages linked from the repository. Download only from the official website or GitHub, never from mirror sites that repackage the file.

  2. 2

    Verify the File

    If a SHA-256 checksum or signature is published with the release, compare it with the downloaded file before running anything. On Windows, PowerShell can calculate a hash with the Get-FileHash command. A mismatch means the file should be discarded and downloaded again from the official source.

  3. 3

    Run the Installer or Extract the Build

    If you received an installer, run it from your Downloads folder and follow the on-screen prompts. If the release is a portable Windows build, extract it to a folder you control, such as Documents, and launch the program from there. Keep a copy of the original download in case you need to reinstall.

  4. Confirm the Setup

    Open the program or the included text and check that the chapters and examples load as expected. Because the project has not been updated since 2020, treat this step as a basic check that the files work, not as proof that everything is current.

08

How to use Programmingbitcoin

Programmingbitcoin is designed to be read and tested, not clicked through. A good way to get value from it is to work slowly and keep notes as you go. The steps below show a simple routine.

  1. Read the introduction and the chapter on how Script works, focusing on the basic operations.
  2. Pause after each example and predict the result before reading the answer.
  3. Open the example code from the project's repository and run it on your own machine.
  4. Change one value or operation and observe how the result changes.
  5. Work through the standard script chapter and rewrite the examples in your own words.
  6. Note any point where the text no longer matches current Bitcoin practice, and check that point against a current source.
  7. Finish by writing a short summary of how a locking and unlocking script pair validates.
09

Pros & cons

Pros
  • Free and open source, with no paid tiers mentioned in the project
  • Clear focus on one subject: how Bitcoin Script works
  • Explains the reasoning behind standard script types, not just the rules
  • Example code lets readers experiment instead of only reading
Cons
  • No code updates since December 2020, so the material is a fixed snapshot
  • Not a wallet, exchange or trading tool despite its catalog category
  • Assumes interest in programming and some comfort with code
  • Covers Bitcoin only, with no support for other networks
10

Is Programmingbitcoin safe?

Programmingbitcoin is a text and code resource, so it never needs a seed phrase, private key or login. The main risk is the source of the download. Get the files only from the official GitHub repository or the project's official pages, and avoid third-party sites offering the same files. Where a SHA-256 checksum or signature is published, verify the download before opening it. Because the project has had no code updates since 2020, it may be out of step with current Bitcoin software, so check the latest version and any recent changes on the official website before relying on the examples. Never enter sensitive information on third-party websites.

  • Official source only. Download from github.com/jimmysong/programmingbitcoin. Ignore ads and lookalike domains.
  • Check the SHA-256. Compare the installer hash with the value the developer publishes before running it.
  • Never share your seed phrase. No developer, support agent or website — including CryptApps — will ever ask for it.
11

Alternatives

Most programs in this part of the catalog are working software. Bisq is a peer-to-peer exchange where users trade bitcoin, and Bisq 2 is its newer version. Komodo DeFi Framework is an engine for atomic swaps aimed at developers, and AtomicDEX API is an archived swap toolkit. Programmingbitcoin is different because it teaches the scripting layer that such tools depend on. If you want to trade, choose an exchange or swap tool. If you want to understand what those tools are actually checking, Programmingbitcoin is the more relevant choice.

12

Specifications

Price
Free
Type
Open source
License
—
Latest version
—
Last update
4 Dec 2020
Windows support
Yes (Windows build or installer)
Source code
github.com/jimmysong/programmingbitcoin
13

Frequently asked questions

Yes. Programmingbitcoin is listed as free and open source. There are no paid tiers or license fees mentioned by the project. Your only cost is your time spent reading and running the examples.

It can be, if you get it from the official GitHub repository or the project's official pages. Verify a published SHA-256 checksum or signature before opening the file. Avoid copies on unfamiliar sites, because a repackaged file could contain anything.

No. It is an educational book about Bitcoin Script, with example code. It does not store coins, send transactions or trade. Our catalog category is a broad label, so read the description to understand what the program actually does.

No. The last code update was on December 4, 2020, so the project should be treated as a fixed resource. The fundamentals of Script are stable, but newer Bitcoin practices may not be covered.

The book was written by Jimmy Song and is listed as a 2019 free online source version. The text is organized into chapters, and chapter 6 covers how Script works, including standard scripts and their weaknesses.

Read the chapters in order and run the example code after each section. Predict results before you check them, and change small details to see the effect. Writing your own short summaries helps the concepts stick.

Some comfort with code helps a lot. The book explains Script from first principles, but the exercises assume you are willing to read and run code. Beginners can still learn from the explanations by reading slowly.

14

Verdict

Programmingbitcoin is a good choice for developers, students and security-minded readers who want to understand how Bitcoin Script validates transactions. It is not a wallet, exchange or trading tool, and it has not been updated since December 2020. Use it as a learning text, verify your download, and check current Bitcoin resources for anything that has changed since then.

Download now