I wanted to create a single byte binary file with only one byte in it: 0x01.
This is the program I wrote in C++ :

```
#include <iostream>
#include <fstream>
using namespace std ;

int main ( )
{
    ofstream some_file ("some_file.bin", ios::out | ios::app | ios::binary);
    some_file << 0x01 ;
    some_file.close( );
    return 0;
}

```

When I inspect the created file using a hex editor - I see the value 0x31 instead of 0x1.
Why is that ?