Click for Table of Contents
The C Primer
Book and Reference Collection
Copyright © 2024 by Rance D. Necaise
Table Of Contents
The C Primer
Copyright © 2024
Rance D. Necaise

6.6 Binary Files

A binary file contains a sequence of binary numbers representing data values as they would be stored in the computer's memory. For example, if we want to store the value 12 in a binary file, it would be written as a binary value using 4-bytes or 32 bits,

00000000000000000000000000001100

the same as it would be stored in memory. In a text file, the ASCII code 52 would be stored in the text file to represent the number 4.

Examples of binary files include those created by word processors, spreadsheet applications, and databases. Binary files cannot be read and displayed in text editors since they contain byte values outside the printable range.

Page last modified on March 16, 2025, at 08:58 AM