Skip to content
← Back to Community
Simple OS: A simple OS!
Profile icon
[deleted]

Simple OS is a operating system made in python binary. I call it simple because it is made of just 7024 1's and 0's. This OS is all text based. Here are the basic commands. "start file_name" runs a python file. "new file_name" creates a new file. "read file_name" reads a file. "del file_name" deletes a file. "app calc" runs the calculator. "download url" downloads a file off the internet by url. Edit: To read some memes type "download https://memes.MarkRatcliffe.repl.co" then save as meme.txt. Afterwards you can read them memes!

Voters
Profile icon
ArmanS3
Profile icon
JacobMacLeod
Profile icon
HYPR
Profile icon
mkhoi
Profile icon
bossotron13
Profile icon
matsogeum8
Profile icon
mathmaniac88
Profile icon
TST2024
Profile icon
thomasgardner20
Profile icon
Teamcrohn
Comments
hotnewtop
Profile icon
[deleted]

Instead of just typing out '1' and '0', most binary programs convert each byte, or 8 bits, into a character. For example, instead of writing '1000001', you would write 'A'.

Profile icon
ChungusFam

That is interesting to [email protected]

Profile icon
TST2024

Can I just say amazing I don't know how people code in binary it seems like it would take forever.

Profile icon
[deleted]

@TST2024 Thanks. Also yeah, binary does take forever to code.

Profile icon
Vandesm14

@MarkRatcliffe Please don't lie that you "coded in binary". This isn't truly an OS nor is it truly binary (machine) code. All you did was convert a python script into binary (from text) and convert the binary back to text on run. You then just run the code. I will say, I like the idea, but it is false advertising to say that you made an "operating system in binary".

Profile icon
sycrepl

@Vandesm14 just checked and yeah, he even commented lol

Profile icon
[deleted]

@Vandesm14 Oh sorry, I did not make it to be like that. I fixed the post.

Profile icon
Martian_

Where is this operating system, I can't find it?

Profile icon
JacobMacLeod

This is so cool! I love it!

Profile icon
prushton

I tried to open a file that didnt exist and got an error. I would make a case to handle that and not kill the program

Profile icon
N3rdL0rd

This is what he actually wrote:

from requests import get # to make GET request

def download(url, file_name):
# open in binary mode
with open(file_name, "wb") as file:
# get request
response = get(url)
# write to file
file.write(response.content)

print('Welcome to Simple OS')
def run(runfile):
with open(runfile,"r") as rnf:
exec(rnf.read())
while(1 == 1):
code = input('> ')
if "start " in code:
code = code.replace("start ","")
run(code)
if "new " in code:
code = code.replace("new ","")
content = input("File Content: ")
f = open(code, "w")
f.write(content)
f.close()
if "read " in code:
code = code.replace("read ","")
f = open(code, "r")
print(f.read())
if "app calc" in code:
print(eval(input("Calculation: ")))
if "del " in code:
code = code.replace("del ","")
import os
os.remove(code)
if "download " in code:
code = code.replace("download ","")
name = input("File name: ")
download(code,name)

Profile icon
[deleted]

@HENRYMARTIN4 Yeah. It is pretty simple. I wrote the python using binary characters. I did all of that manually

Profile icon
N3rdL0rd

@MarkRatcliffe Oh. I assumed you used a simple binary translator.

Profile icon
Coder100

Nice work! I would do this in python, but binary seems more appropriate:

011101110110100001101001011011000110010100101000010101000111001001110101011001010010100100111010000010100010000000100000011101100110111101110100011001010111001100100000001010110011110100100000001100010000101000100000001000000110001001101001011011100110000101110010011110010010000000101011001111010010000000110001

Translation:

while(True): votes += 1 binary += 1
Profile icon
mathmaniac88

where did u learn to code binary can u give me a link or something. Thx!