Skip to main content

Questions tagged [hexadecimal]

This tag is for challenges related to hexadecimal, or base 16, a number system that often uses the digits 0 ‐ 9 and a ‐ f. Only use this tag on challenges specific to base 16, rather than generic [base-conversion] challenges

21 votes
60 answers
3k views

RGB to hexadecimal

Based off a Scratch project The pen extension in Scratch has a set pen color to () block. The () is normally a color dropdown, ...
SectorCorruptor's user avatar
12 votes
39 answers
3k views

Hexadecimal -> Binary Art

Take a list of 2-digit hexadecimal numbers as input, and output the binary value, replacing each 1 with an 'X', and each 0 with a space. For example Input = ...
The Thonnu's user avatar
  • 18.2k
21 votes
36 answers
3k views

Reverse hex cipher

Characters in strings are sometimes represented as their ASCII hexadecimal codes. Printable characters have two hex digits in their representation. Swapping those digits leads to another character, ...
pajonk's user avatar
  • 17.2k
6 votes
3 answers
340 views

Write a regex that would increment a 2-digit hexadecimal number

Your regex will receive a string of the form !XX! #<extra> where X is any hexadecimal digit (0-9 and A-F capital letters ...
Itay123's user avatar
  • 71
12 votes
8 answers
1k views

Scientific notation in Base-16

Input a scientific notation number (base 10), output scientific notation in base 16 (as defined below). Details In scientific notation, all non-zero numbers are written in the form $$ m \times 10^n $$ ...
tsh's user avatar
  • 35k
22 votes
21 answers
5k views

Code Golf Measurer © 2019

Code Golf Measurer © 2019 Hexdumps used with xxd look something like this: ...
gadzooks02's user avatar
24 votes
23 answers
4k views

Find the closest three-digit hex colour

In CSS, colours can be specified by a "hex triplet" - a three byte (six digit) hexadecimal number where each byte represents the red, green, or blue components of the colour. For instance, ...
wrymug's user avatar
  • 800
-2 votes
11 answers
570 views

Convert alphanumeric (base-36) sentences into hexadecimal (base-16) sentences

I use "sentence" here loosely to mean "any sequence of words separated by spaces" and "words" to mean "sequences of alphanumeric (hexatrigesimal) characters unseparated by spaces". Conversion is from ...
DrQuarius's user avatar
  • 640
0 votes
1 answer
341 views

Python code to produce C++14 hex integer literal with ticks

tl;dr? See bottom for The Competition Integer literals While programming, the 64-bit hexadecimal literal 0x123456789abcdefL is difficult to gauge the size of. I ...
John Burger's user avatar
2 votes
5 answers
4k views

0xDEADBEEF is not tasty, but still 0xFEEDBEEF

Inspired by "You had me at hello" Introduction For those who don't know, hexadecimal is a base system like decimal. Contrary to decimal however, it uses 16 (hence the name) digits instead of ...
kepe's user avatar
  • 943
52 votes
30 answers
6k views

Let's golf a BIBABOBU decoder

While I was traveling in the future, I noticed a funny game among kids circa 2275. When they don't want their great-great-great-great-grand parents to understand what they're saying, they use the ...
Arnauld's user avatar
  • 194k
1 vote
0 answers
197 views

Render a monospaced bitmap font from image [closed]

Input is in this format: image fontwidth fontheight rowwidth xoffset yoffset xgap ygap non-existent charstart thetextitself thetextitself: The text that should ...
Piotr Grochowski's user avatar
22 votes
35 answers
5k views

Swap the Endianness

As most of you probably know, (byte-addressable) hardware memories can be divided into two categories - little-endian and big-endian. In little-endian memories the bytes are numbered starting with 0 ...
ბიმო's user avatar
  • 16.8k
1 vote
28 answers
2k views

Binary to Hexadecimal

Convert a binary number (of any size) into a hexadecimal number. Input A POSITIVE binary number with just the 0s and 1s. A ...
Hashim Kayani's user avatar
13 votes
21 answers
2k views

How to convert HEX2 to RGBA?

The world of art is full of colour, but the world of the network is even fuller than the world of art of diferent colours and it's renderings. That's why we need to know how to convert one type of ...
Obsdarek's user avatar
  • 165

15 30 50 per page