Ir al contenido principal

Hexadecimal to Decimal

To convert a hexadecimal to decimal all we have to do is do is perform the opposite procedure we used to convert to hex.


In this example we will turn back the number that we used here(#35) into decimal.

First we must use the table to get back again the Remainder
Decimal value Hex Equivalent
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 A
11 B
12 C
13 D
14 E
15 F
Note: each hexadecimal digit represents the Remainders found when converting the number from decimal to hexadecimal 

Now revert the Process by performing these simple steps:
  1.  Use the  table above to find the decimal equivalent of each Remainder in the case of #35 is 3 5
  2. Multiply each of the remainders(decimal equivalent of each hex character) by 16 to the power of "n" where "n" is the position of each character. The position of the character is found by counting from right to left and starting the count on 0 rather than 1. Note: the first position is 0.
  3. Repeat the process for each hexadecimal character and sum up all of the results.

Full example Result
(3 x 161) + (5 x 160) 48 + 5 = 53

References: 

Comentarios

Entradas más populares de este blog

Mind opening videos and reads

Existence, self-awareness, religion, philosophy and psychology: Existentialism: Crash Course Philosophy #16 Existential Therapy: Meaninglessness The philosophy of Stoicism - Massimo Pigliucci   Is life meaningless? And other absurd questions - Nina Medvinskaya   The Problem of Evil: Crash Course Philosophy #13 Determinism vs Free Will   Behavior and Belief   Mind Field - Freedom of Choice (Ep 5) Why Do We Get Bored? - YouTube    Fear of death: This Ancient Egyptian Mega-Tomb is the Largest of its Kind ⚱️ Tomb Hunters 101 | Smithsonian Channel     ‘Magic Servants’ Found Packed into Ancient Egyptian Tombs ⚱️ Tomb Hunters | Smithsonian Channel El Videojuego más Filosófico que haya Existido | Nier: Automata Reasoning and reality: Can you outsmart the fallacy that fooled a generation of doctors? - Elizabeth Cox (the explanation is a bit childish but this kind of issues are real) Do Chairs Exist?   Plato’s Allegory of the Cave - Alex Gendler - YouTube Cartesian Skepticism - Neo, Meet Rene:

All Possible Color Combinations

A display can project 16,777,216 different colors . One way to generate all color combinations is by using the same method employed on this article but with Hexadecimal numbers . If we count from 0 to 16,777,215(#000000 to #FFFFFF) and convert each number to hexadecimal we will generate all of the 16,777,216 colors . See this method in action by moving the slider below. See the Pen All Colors by LiveUser ( @liveuser ) on CodePen . By using this method to generate each color and assigning them to individual pixels I was able to produce a 8192x2048(16777216) pixel image. Click/tap here to see full resolution image