Skip to content

BlocksumoGuys/BaseConverters

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

BaseConverters

A Luau (Roblox) module for converting numbers between decimal, binary, and hexadecimal formats.


Features

  • Convert Decimal to Binary
  • Convert Binary to Decimal
  • Convert Decimal to Hexadecimal
  • Convert Hexadecimal to Decimal

All conversions are done manually without relying solely on built-in functions, making it a great learning tool!


Installation

Simply copy the BaseConverters.lua file into your Roblox project or require it from your preferred location.


Usage

local BaseConverters = require(path.to.BaseConverters)

-- Decimal to Binary
print(BaseConverters.DecimalToBinary(10)) -- Output: "1010"

-- Binary to Decimal
print(BaseConverters.BinaryToDecimal("1010")) -- Output: 10

-- Decimal to Hexadecimal
print(BaseConverters.DecimalToHexadecimal(255)) -- Output: "FF"

-- Hexadecimal to Decimal
print(BaseConverters.HexadecimalToDecimal("FF")) -- Output: 255

Credits

BlocksumoGuys

About

Converters to different base numbers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages