g | x | w | all
Bytes Lang Time Link
087Swift 6250429T131646ZmacOSist
095Tcl171103T013442Zsergiol
013Vyxal 3 Ṁ240923T120300Zpacman25
101Swift240814T135950ZDaniel
041Fortran GFortran240815T041812Zroblogic
038Bash161217T013756ZDigital
073Red240815T082239ZGalen Iv
063Excel VBA170822T175321ZTaylor R
073Excel240814T044825ZTaylor R
086Go240813T174242Zbigyihsu
01105AB1E190321T094035ZKevin Cr
034Uiua240729T024819Znoodle p
009Vyxal240801T054547Zlyxal
102Setanta240728T223931Zbb94
056Factor210530T052235Zchunes
022Vyxal j210530T032744Zemanresu
016MathGolf190321T091006Zmaxb
015Charcoal190316T235526ZASCII-on
036Perl 6190319T003451Zbb94
161Ink190209T005830ZSara J
036K7190316T141508Zyiyus
084APLNARS190316T091622Zuser5898
024Pyth190315T221017ZScott Ar
073QBasic190315T213429ZDLosc
087Haskell190315T211536Zdfeuer
058Mouse2002190315T211416ZMooseOnT
067C# Visual C# Interactive Compiler190315T200741ZGymhgy
011Stax190301T004855Zrecursiv
015Japt R170822T104235ZShaggy
065Forth gforth190208T194411Zreffu
055Python 3190208T193212ZBeefster
056PHP170822T193840ZTitus
077JavaScript ES6161217T124523ZNeil
105Jq 1.5171105T002436Zjq170727
075Julia171103T021047ZEricSher
079Java 8171027T075815ZKevin Cr
045VBA Excel171027T073645Zremoel
022J171026T231945ZFrownyFr
033APL Dyalog171026T221019ZUriel
026q/kdb+170822T084404Zmkst
066C161218T020800ZKarl Nap
066VBA161228T214951ZJoffan
060Proton170822T165725ZBusiness
073Python 2161217T041250Z0xffcour
045Perl 5170821T191307ZXcali
066Python 3170821T184834Z0WJYxW9F
063Common Lisp170222T182105Zuser6516
544///170226T010913Zboboquac
588///170225T023137ZEsolangi
050k170222T231047Zzgrep
047SmileBASIC170222T215750Z12Me21
089Python2161217T105652ZYytsi
061C170104T012707Zuser5634
104JavaScript161228T195805ZJulian L
01705AB1E161219T182448ZOsable
056Scala161219T173546Zcorvus_1
nan161217T214614ZBrad Gil
048Perl161217T192824ZGabriel
034Octave161217T192636Zrahnema1
012Jelly161217T023324ZDennis
053Matlab161217T124704ZOwen Mor
042R161217T102840ZJAD
046PowerShell161217T073107ZAdmBorkB
046Mathematica161217T062735ZGreg Mar
098C#6161217T061243ZLink Ng
060Python 2161217T024805ZDennis
049Ruby161217T025529ZLevel Ri
068WinDbg161217T015254Zmilk
018MATL161217T013712ZLuis Men
023Pyth161217T011942ZMaltysen

Swift 6, 87 bytes

for i in 0...15{print((0...15).map{("0\(String(i*$0,radix:16)) ").suffix(3)}.joined())}

Tcl, 95 bytes

time {incr i
time {lappend s [format %02x [expr ($i-1)*([incr j]-1)]]} 16
puts $s
unset j s} 16

Try it online!


# [Tcl], 98 bytes
time {incr i
set j 0
time {puts -nonewline [format %02x\  [expr ($i-1)*$j]]
incr j} 16
puts ""} 16

Try it online!


# [Tcl], 102 bytes
set i 0
time {set j 0
time {puts -nonewline [format %02x\  [expr $i*$j]]
incr j} 16
puts ""
incr i} 16

Try it online!

Vyxal 3 -Ṁ, 13 bytes

₁:ẊᵛЧΠH2Þ0₁Ẇ'

Vyxal It Online!

Swift, 101 Bytes

import iAd
(0...15).map{for j in 0...15{print(String(format:"%02x",$0*j),terminator:j>14 ?"\n":" ")}}

Fortran (GFortran), 41 bytes

print'(16Z3.2)',((j*i,j=0,15),i=0,15)
end

Try it online!   43 bytes 50 bytes

Bash, 38

printf %02x\  $[{0..15}*{0..15}]|rs 16

Try it online!


Alternative solution:

Bash + jot, 38

eval '
jot -s\  -w%02x 16 0 - '{0..15}

Try it online!

Red, 73 bytes

repeat i 16[repeat j 16[prin to-hex/size i - 1 *(j - 1)2 prin" "]print""]

Try it online!

Excel VBA, 63 Bytes

Anonymous function that takes no input and outputs to the VBE immediate window. Calculates a 1-D array of outputs using the array multiplication of an intermediate value stored in [A1].

For r=0To 15:[A1]=r:?Join([Dec2Hex((Column(A:P)-1)*A1,2)]):Next

Alternate Version, 44 Bytes

Anonymous VBE immediate window function that takes no input and outputs hex multiplication table to the range [A1:P16]

[A1:P16]="=Dec2Hex((Row()-1)*(Column()-1)),2)

Note: this solution uses a standard Excel output method which may or may not meet the requirements of the tag.

Pure VBA, 64 Bytes

An anonymous VBE immediate window function.

For r=0To 15:For c=0To 15:?Right("0"+Hex(r*c),2)" ";:Next:?:Next

Excel, 73 bytes

An anonymous function that outputs the entire table within the calling cell, as required by the tag.

=LET(c,COLUMN(A:P)-1,CONCAT(DEC2HEX((ROW(1:16)-1)*c,2)&IF(c>14,"
"," ")))

Excel Output

Alternate Version, 41 bytes

If the table may be output to the activesheet object directly, the code may be golfed down significantly to

=DEC2HEX((ROW(1:16)-1)*(COLUMN(A:P)-1),2)

Go, 86 bytes

import."fmt"
func f(){for i:=range 16{for j:=range 16{Printf(`%02x `,i*j)}
Println()}}

Attempt This Online!

05AB1E, 12 11 bytes

15Ýδ*16‰hJ»

-1 byte removing the D before the δ, since when no input is given, it'll use the last item on the stack implicitly instead, and therefore use the list twice.

Try it online.

Explanation:

15Ý          # Create a list in the range [0,15]: 
             #  [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
             # Create a multiplication table of this list:
   δ         #  Apply double-vectorized:
             #  (since there is not input given; use this list twice)
    *        #   Multiply
     16‰     # Take the divmod 16 for each
        h    # Convert each number to hexadecimal 
         J   # Join the inner-most pairs together
          »  # Join each inner list by spaces, and then each string by newlines
             # (and output the result implicitly)

Uiua, 37 34 bytes

≡&p≡/$"_ _"⊏∵⊟⌊⊃÷◿16⊞×.°⊏HexDigits

Try it online!

HexDigits # "0123456789abcdef"

°⊏        # [0 1 2 3 ... 15]
⊞×.       # multiplication table
⌊⊃÷◿16    # divmod by 16
# division is first digit, remainder is second digit
∵⊟        # pair the division and remainder
⊏         # index each number into the hex digits string

≡/$"_ _"  # join rows on spaces
≡&p       # print each line

Edit (37 → 34): I learned that HexDigits is a built-in constant.

Vyxal, 72 bitsv2, 9 bytes

16ʁ:v*H2↳›⁋

Try it Online!

Bitstring:

010000010101010011100000010011001000100110001001111100111100011010000110

I can do a packed answer too :p

Explained

16ʁ:v*H2↳›⁋­⁡​‎‎⁡⁠⁡‏⁠‎⁡⁠⁢‏⁠‎⁡⁠⁣‏‏​⁡⁠⁡‌⁢​‎‎⁡⁠⁤‏‏​⁡⁠⁡‌⁣​‎‎⁡⁠⁢⁡‏⁠‎⁡⁠⁢⁢‏‏​⁡⁠⁡‌⁤​‎‎⁡⁠⁢⁣‏‏​⁡⁠⁡‌⁢⁡​‎‎⁡⁠⁢⁤‏⁠‎⁡⁠⁣⁡‏⁠‎⁡⁠⁣⁢‏‏​⁡⁠⁡‌⁢⁢​‎‎⁡⁠⁣⁣‏‏​⁡⁠⁡‌­
16ʁ          # ‎⁡The range [0, 16],
   :         # ‎⁢Pushed twice
    v*       # ‎⁣[lhs * range [0, 16] for lhs in range [0, 16]]
      H      # ‎⁤With result converted to hexadecimal
       2↳›   # ‎⁢⁡And padded to be two characters, with a 0 if needed.
          ⁋  # ‎⁢⁢Join all sublists on spaces, then the entire thing on newlines
💎

Created with the help of Luminespire.

Setanta, 102 bytes

s:="0123456789abcdef"t:=""le i idir(0,16){le j idir(0,16)t+=s[i*j//16]+s[i*j%16]+" "t+="\n"}scriobh(t)

try-setanta.ie link

Factor, 56 bytes

16 iota dup '[ _ [ * "%02X "printf ] with each nl ] each

Try it online!

I went through a progression as I realized matrix words are too long:

{ 16 16 } matrix-coordinates [ Π "%02X"sprintf ] matrix-map simple-table.
{ 16 16 } matrix-coordinates [ [ Π "%02X "printf ] each nl ] each
16 iota dup [ * "%02X"sprintf ] cartesian-map simple-table.
16 iota [ 16 iota [ * "%02X "printf ] with each nl ] each
16 iota dup '[ _ [ * "%02X "printf ] with each nl ] each

Vyxal j, 22 bytes

15ʀƛ15ʀ*ƛk6τ:L1=[0p];Ṅ

Try it Online!

15ʀ                    # List 0...15
   ƛ                   # Map to...
    15ʀ                # 0...15
       *               # Multiplied by (number)
        ƛ           ;  # Map to...
         k6τ           # Base16
            :L1=[0p]   # Prepend 0 as necessary
                     Ṅ # Join by spaces

MathGolf, 16 bytes

☻r■mÉε*¢0═ uM∞/n

Try it online!

Explanation

It might be shorter to do it with a loop, I'll have to try that.

☻                  push 16
 r                 range(0, n)
  ■                cartesian product with itself
   mÉ              explicit map using next 3 operators
     ε*            reduce list by multiplication
       ¢           convert to/from hexadecimal
        0          push 0
         ═         pad list elements with zeroes to equal length
                   space character
           u       join with separator (joins on space)
            M      push 24
             ∞     pop a, push 2*a = 48 (each line is 48 characters long)
              /    pop a, b : push(a/b), split strings
               n   newline char, or map array with newlines

Charcoal, 16 15 bytes

E¹⁶⭆¹⁶﹪%02x ×ιλ

Try it online! Link is to verbose version of code.

Alternative 16-byter using automatic grid output of Wolfram lists: ▷LE¹⁶E¹⁶﹪%02x×κμ

Explanation

E¹⁶                      Map for i from 0 to 15 (with k as index variable, but here it's the same as i)
    ⭆¹⁶                  Map for l from 0 to 15 (with m as index variable), then join with "" into a string
       ﹪                Modulo (used for Python's string format here)
         %02x            Input formatted (%), padded with zeros (0) to length two (2)
                         as a hexadecimal number (x), with a space ( ) at the end
              ×ιλ        i * l

Perl 6, 49 36 bytes

say ($_ <<*<<^16).fmt("%02x")for ^16

Old solution:

for ^16 ->\a {printf "%02x ",a*$_ for ^16;say ""}

Ink, 169 167 161 bytes

VAR r=-1
-(l)
~temp c=0
~r++
{r>15:->END}
-(v)
{h((r*c)/16)}{h(r*c)}
~c++
{c>15:->l}<> ->v
==function h(n)
{n%16-10:
-0:a
-1:b
-2:c
-3:d
-4:e
-5:f
-else:{n%16}
}

Try it online!

Ungolfed

VAR row=-1                                  // Declare a global variable which keeps track of the current row.
-(line)                                     // A named gather point, which can be jumped to later.

~temp column = 0                            // Declare a local varialbe called column, and set it to 0. Locals use 2 bytes more than globals, but they also reset the value if the line is later reached again.
~row++                                      // Increment the row counter.
{row>15:->END}                              // If we're about to start a 17th row, we terminate the program instead. If not, we continue onwards...

-(number)                                   // Another place to jump to
{digit((row*column)/16)}{digit(row*column)} // Calculate the two digits of the number and pass each of them to the digit function defined below to print them.
~column++                                   // Increment the column counter
{column>15:->row}<> ->number                // If we're done with this row we divert to row, to print another row. Otherwise, we concatenate a space to this row and divert to number.

== function digit(n) ==                     // Declare a function which prints a single hex digit.
{n%16-10:                                   // Multi-line conditional - basically a switch statement.
-0:a                                        // If n mod 16 is 10, write an a
-1:b                                        // If it's 11, write a b
-2:c                                        // ...etc...
-3:d
-4:e
-5:f
-else:{n%16}                                // If none of those matched, write n mod 16, as it'll be the same in hex and decimal
}                                           // End of conditional, and also of the function - it doesn't return anything.

Edit: Saved 2 bytes by using stitches instead of knots.
Edit: Saved 3 bytes by tweaking the printing function, and another 3 bytes by rewriting the main logic to use gathers instead of stitches.

K7, 36 bytes

` 0:" "/:'{`hex@`c$x}''{x*/:\:x}@!16

APL(NARS), 42 chars, 84 bytes

{{(⎕D,⎕A)[1+16∣(⌊⍵÷16),⍵]}¨×/¨m∘.,m←0,⍳15}

I copy something from others... ×/¨m∘.,m←0,⍳15 would build the multiplication table of 0,⍳15; the function {(⎕D,⎕A)[1+16∣(⌊⍵÷16),⍵]} convert each number in the multiplication table in hex for only 2 digits.

 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 
 00 02 04 06 08 0A 0C 0E 10 12 14 16 18 1A 1C 1E 
 00 03 06 09 0C 0F 12 15 18 1B 1E 21 24 27 2A 2D 
 00 04 08 0C 10 14 18 1C 20 24 28 2C 30 34 38 3C 
 00 05 0A 0F 14 19 1E 23 28 2D 32 37 3C 41 46 4B 
 00 06 0C 12 18 1E 24 2A 30 36 3C 42 48 4E 54 5A 
 00 07 0E 15 1C 23 2A 31 38 3F 46 4D 54 5B 62 69 
 00 08 10 18 20 28 30 38 40 48 50 58 60 68 70 78 
 00 09 12 1B 24 2D 36 3F 48 51 5A 63 6C 75 7E 87 
 00 0A 14 1E 28 32 3C 46 50 5A 64 6E 78 82 8C 96 
 00 0B 16 21 2C 37 42 4D 58 63 6E 79 84 8F 9A A5 
 00 0C 18 24 30 3C 48 54 60 6C 78 84 90 9C A8 B4 
 00 0D 1A 27 34 41 4E 5B 68 75 82 8F 9C A9 B6 C3 
 00 0E 1C 2A 38 46 54 62 70 7E 8C 9A A8 B6 C4 D2 
 00 0F 1E 2D 3C 4B 5A 69 78 87 96 A5 B4 C3 D2 E1 

I see how using functions and ¨ problems are break in simple problems...

Pyth, 24 bytes

V16FZU16p+%"%02x"*ZNd)pb

Try it online!

Might post an explanation or ungolfed version later.

QBasic, 73 bytes

FOR x=0TO 15
FOR y=0TO 15
?HEX$(x*y\16);HEX$(x*y MOD 16);" ";
NEXT
?
NEXT

I golfed a custom procedure for converting to hex digits, before I realized there's a builtin for that. Now my code is shorter and more boring. :^(

Original 103-byte code:

FOR x=0TO 15
FOR y=0TO 15
p x*y\16
p x*y MOD 16
?" ";
NEXT
?
NEXT
SUB p(d)
?CHR$(48+d-7*(d>9));
END SUB

Haskell, 87 bytes

import Numeric
main=mapM(\x->putStrLn$do y<-s;['0'|x*y<16]++showHex(x*y)" ")s
s=[0..15]

Try it online!

I imagine there's a better way. Maybe depend on the printf package....

Mouse-2002, 58 bytes

8&WSIZE (qx.-^x.0y:(y.q<^y.x.y.*&!HEX " "y.1+y:)"!"x.1+x:)

Try it online!

C# (Visual C# Interactive Compiler), 67 bytes

for(int i=0;i<256;)Write($"{(i%16<1?"\n":"")} {i/16*(i++%16):X2}");

Try it online!

Stax, 11 bytes

äΔ←ùûv╚ö♦.J

Run and debug it

Japt -R, 20 15 bytes

GÆGÇ*X sGÃùT2 ¸

Try It Online!

GÆGÇ*X sGÃùT2 ¸
G                   :16
 Æ                  :Map each X in the range [0,G)
  GÇ                :  Map the range [0,G)
    *X              :    Multiply by X
       sG           :    Convert to base-16 string
         Ã          :  End map
          ù         :  Left pad each
           T        :    With 0
            2       :    To length 2
              ¸     :  Join with spaces
                    :Implicitly join with newlines and output

Forth (gforth), 65 bytes

: f 16. do cr 16. do i j * 16 /mod hex 1 .r . decimal loop loop ;

Try it online!

Explanation

Nested loop from 0 to 15. Each Iteration:

Code Explanation

: f             \ start new word definition
  16. do        \ outer loop from 0 to 15
    cr          \ output newline
    16. do      \ inner loop from 0 to 15
      i j *     \ multiply loop indexes
      16 /mod   \ get quotient and remainder of dividing by 16
      hex       \ set base to 16
      1 .r      \ print quotient (equivalent to first digit) right-aligned in space of 1 (no space)
      .         \ print second digit (with space)
      decimal   \ set base back to 10 (decimal)
    loop        \ end inner loop
  loop          \ end outer loop
;               \ end word definition

Python 3, 55 bytes

r=range(16)
for x in r:print(*['%02x'%(x*y)for y in r])

Using %formatting saves quite a few bytes over [2:] usage. So does using * splats on the print function.

PHP, 57 56 bytes

while($z<256)printf("
"[$x=$z%16]."%02x ",$x*($z++>>4));

Run with -nr or try it online.

Note the trailing space in the first line! One byte saved by @gwaugh.

JavaScript (ES6), 79 78 77 bytes

f=(i=256)=>i?f(--i)+(i%16*(i>>4)+256).toString(16).slice(1)+`
 `[~i&15&&1]:``

document.write('<pre>'+f())

Edit: Saved 1 byte thanks to @ETHproductions and another byte thanks to @YairRand.

Jq 1.5, 105 bytes

def h:[("0123456789abcdef"/"")[.[]]]|add;[range(16)*range(16)|[(./16|floor),.%16]|h]|_nwise(16)|join(" ")

Expanded (jq has no "%x" formatting so we roll our own)

def tohex:                 # convert [x,y] to hex string "xy"
  [("0123456789abcdef"/"")[.[]]] | add;

[   range(16)*range(16)    # generate values
  | [(./16|floor), .%16]   # convert to [x,y] digits base 16
  | tohex                  # convert to hex string
]
| _nwise(16)               # split into subarrays of length 16
| join(" ")                # convert subarrays to strings

Try it online!

Julia, 83 75 bytes

r=0:15;[([print(num2hex(i*j)[15:16]," ")for i in r],print('\n'))for j in r]

Java 8, 98 90 79 bytes

v->{for(int i=0;i<256;System.out.printf("%02x%c",i/16*(i++%16),i%16<1?10:32));}

Explanation:

Try it here.

v->{                    // Method with empty unused parameter and no return-type
  for(int i=0;          //  Index-integer, starting at 0
      i<256;            //  Loop from 0 to 256
    System.out.printf(  //   Print with format:
      "%02x             //    the lowercase 2-digit hexadecimal representation
           %c",         //    + a character
       i/16             //     `i` divided by 16 (integer division in Java truncates)
       *(i++%16)        //     multiplied by `i` modulo-16
                        //     (and increase `i` by 1 afterwards with `i++`)
       i%16<1?          //     If `i` is now a multiple of 16:
        10              //      Replace `%c` with a new-line
       :                //     Else:
        32)             //      Replace `%c` with a space instead
  );                    //  End of loop
}                       // End of method

VBA (Excel), 45 Bytes

By using VBA Immediate Window.

[A1:P16]="=DEC2HEX((row()-1)*(column()-1),2)"

J, 22 bytes

echo,.3{."1 hfd*/~i.16

Try it online!

APL (Dyalog), 44 43 36 33 bytes

10 bytes saved thanks to @Adám

Crossed out 44 is still regular 44 ;(

↑,/{(⎕D,⎕A)[16 16⊤⍵],' '}¨∘.×⍨⍳16

Uses ⎕IO←0.

Try it online!

How?

∘.×⍨⍳16 - multiplication table of 0 .. 15

¨ - for each item

16 16⊤⍵ - take the first 2 digits of hexadecimal encoding

(⎕D,⎕A)[...] - index into "0123456789ABCDEF..."

,' ' - append space

,/ - join each row

- and columnify

Output

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 
00 02 04 06 08 0A 0C 0E 10 12 14 16 18 1A 1C 1E 
00 03 06 09 0C 0F 12 15 18 1B 1E 21 24 27 2A 2D 
00 04 08 0C 10 14 18 1C 20 24 28 2C 30 34 38 3C 
00 05 0A 0F 14 19 1E 23 28 2D 32 37 3C 41 46 4B 
00 06 0C 12 18 1E 24 2A 30 36 3C 42 48 4E 54 5A 
00 07 0E 15 1C 23 2A 31 38 3F 46 4D 54 5B 62 69 
00 08 10 18 20 28 30 38 40 48 50 58 60 68 70 78 
00 09 12 1B 24 2D 36 3F 48 51 5A 63 6C 75 7E 87 
00 0A 14 1E 28 32 3C 46 50 5A 64 6E 78 82 8C 96 
00 0B 16 21 2C 37 42 4D 58 63 6E 79 84 8F 9A A5 
00 0C 18 24 30 3C 48 54 60 6C 78 84 90 9C A8 B4 
00 0D 1A 27 34 41 4E 5B 68 75 82 8F 9C A9 B6 C3 
00 0E 1C 2A 38 46 54 62 70 7E 8C 9A A8 B6 C4 D2 
00 0F 1E 2D 3C 4B 5A 69 78 87 96 A5 B4 C3 D2 E1 

q/kdb+, 46 26 bytes

Solution:

-1" "sv'($)4h$x*/:x:(!)16;

Example:

q)-1" "sv'($)4h$x*/:x:(!)16;
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
00 02 04 06 08 0a 0c 0e 10 12 14 16 18 1a 1c 1e
00 03 06 09 0c 0f 12 15 18 1b 1e 21 24 27 2a 2d
00 04 08 0c 10 14 18 1c 20 24 28 2c 30 34 38 3c
00 05 0a 0f 14 19 1e 23 28 2d 32 37 3c 41 46 4b
00 06 0c 12 18 1e 24 2a 30 36 3c 42 48 4e 54 5a
00 07 0e 15 1c 23 2a 31 38 3f 46 4d 54 5b 62 69
00 08 10 18 20 28 30 38 40 48 50 58 60 68 70 78
00 09 12 1b 24 2d 36 3f 48 51 5a 63 6c 75 7e 87
00 0a 14 1e 28 32 3c 46 50 5a 64 6e 78 82 8c 96
00 0b 16 21 2c 37 42 4d 58 63 6e 79 84 8f 9a a5
00 0c 18 24 30 3c 48 54 60 6c 78 84 90 9c a8 b4
00 0d 1a 27 34 41 4e 5b 68 75 82 8f 9c a9 b6 c3
00 0e 1c 2a 38 46 54 62 70 7e 8c 9a a8 b6 c4 d2
00 0f 1e 2d 3c 4b 5a 69 78 87 96 a5 b4 c3 d2 e1

Explanation:

-1" "sv'string 4h$x*/:x:til 16; / ungolfed solution
                        til 16  / range 0..15
                      x:        / save in variable x
                  x*/:          / x multiplied by each-right (generate 0..15*0..15)
               4h$              / cast result to byte array (0x00...)
        string                  / convert byte array to string
  " "sv'                        / join (sv) each (') with space (" ")
-1                            ; / write to stdout and swallow return value

Notes:

C, 68 66 bytes

f(i){for(i=0;i<256;)printf("%02x%c",i%16*(i++/16),i%16<15?32:10);}

-2 bytes thanks to ceilingcat!

Ungolfed:

f(i){
  for(i=0; i<256;)
    printf("%02x%c", i%16*(i++/16), i%16<15 ? 32 : 10);
}

Prints the zero padded result and either space or newline.

VBA, 66 bytes

For m=0To 15:For n=0To 15:?Right(Hex(256+n*m)&" ",3);:Next:?:Next

Enter in Immediate window in VBA editor. Adding 256 to the expression to convert to hexadecimal is only shorter because the concatenater "&" requires a space after it to separate from alphabetic strings.

Proton, 60 bytes

x=0;eval("print(' '.join('%02x'%(x*y)for y:0..16));x++;"*16)

Try it online!

Python 2, 112 109 100 96 73 Bytes

R=range(16)
for i in R:print' '.join('0'*(i*j<16)+hex(i*j)[2:]for j in R)

Try it online!

Perl 5, 45 bytes

for$"(@a=0..15){printf"%02x ",$_*$"for@a;say}

Try it online!

Python 3, 66 bytes

r=range(16)
for i in r:print(*[('0'+hex(j*i)[2:])[-2:]for j in r])

Common Lisp, 88 70 69 63 bytes

(#1=dotimes(j 16)(#1#(k 16)(format t"~2,'0x "(* k j)))(terpri))

Using idea from here

A bit of explanation

~2,'0x ;display in hexadecimal, padding with minimum two digits, padding symbol is 0

///, 544 bytes

Well, everyone's doing /// answers now:

/|/\/\///Z/\/ |P/
0B|MZ9|LZ8|KZ7|JZ6|IZ5|HZ4|GZ3|FZ2|EZ1|C/BBB|B/0A|AZ0/0CCCCC0P1A2A3A4A5A6A7A8A9AaAbAcAdAeAfP2A4A6A8AaAcAeE0E2E4E6E8EaEcEeP3A6A9AcAfE2E5E8EbEeF1F4F7FaFdP4A8AcE0E4E8EcF0F4F8FcG0G4G8GcP5AaAfE4E9EeF3F8FdG2G7GcH1H6HbP6AcE2E8EeF4FaG0G6GcH2H8HeI4IaP7AeE5EcF3FaG1G8GfH6HdI4IbJ2J9P8E0E8F0F8G0G8H0H8I0I8J0J8K0K8P9E2EbF4FdG6GfH8I1IaJ3JcK5KeL7PaE4EeF8G2GcH6I0IaJ4JeK8L2LcM6PbE6F1FcG7H2HdI8J3JeK9L4LfMa a5PcE8F4G0GcH8I4J0JcK8L4M0Mc a8 b4PdEaF7G4H1HeIbJ8K5L2LfMc a9 b6 c3PeEcFaG8H6I4J2K0KeLcMa a8 b6 c4 d2PfEeFdGcHbIaJ9K8L7M6 a5 b4 c3 d2 e1

I replaced \s0 through \s9 with A then E through M, 0 0 with C, \n00 0 with P, /\s with Z and finally // with |, adding all these at the front of the code as I went.

Try it online!

///, 588 bytes

/;/\/ //|/\/\///A/00 |B/
A|C;0|D;1|E;2|F;3|G;4|H;5|I;6|J;7|K;8/AAAAAAAAAAAAAAAAB01C2C3C4C5C6C7C8C9CaCbCcCdCeCf B02C4C6C8CaCcCeD0D2D4D6D8DaDcDe B03C6C9CcCfD2D5D8DbDeE1E4E7EaEd B04C8CcD0D4D8DcE0E4E8EcF0F4F8Fc B05CaCfD4D9DeE3E8EdF2F7FcG1G6Gb B06CcD2D8DeE4EaF0F6FcG2G8GeH4Ha B07CeD5 1cE3EaF1F8FfG6GdH4HbI2I9 B08D0D8E0E8F0F8G0G8H0H8I0I8J0J8 B09D2DbE4EdF6FfG8H1HaI3IcJ5JeK7 B0aD4DeE8F2FcG6H0HaI4IeJ8K2Kc 96 B0b 16E1EcF7G2Gd 58I3IeJ9K4Kf 9a a5 B0c 18E4F0FcG8 54I0IcJ8K4 90 9c a8 b4 B0d 1aE7F4G1GeHbI8J5K2Kf 9c a9 b6 c3 B0eDcEaF8G6H4I2J0JeKc 9a a8 b6 c4 d2 B0fDeEdFcGb 5aI9J8K7 96 a5 b4 c3 d2 e1 

A more readable version with newlines:

/]
[///;/\/ //|/\/\///A/00 |B/
A|C;0|D;1|E;2|F;3|G;4|H;5|I;6|J;7|K;8/]
[AAAAAAAAAAAAAAAAB01C2C3C4C5C6C7C8C9CaCbCcCdCeCf ]
[B02C4C6C8CaCcCeD0D2D4D6D8DaDcDe B03C6C9CcCfD2D5D]
[8DbDeE1E4E7EaEd B04C8CcD0D4D8DcE0E4E8EcF0F4F8Fc ]
[B05CaCfD4D9DeE3E8EdF2F7FcG1G6Gb B06CcD2D8DeE4EaF]
[0F6FcG2G8GeH4Ha B07CeD5 1cE3EaF1F8FfG6GdH4HbI2I9]
[ B08D0D8E0E8F0F8G0G8H0H8I0I8J0J8 B09D2DbE4EdF6Ff]
[G8H1HaI3IcJ5JeK7 B0aD4DeE8F2FcG6H0HaI4IeJ8K2Kc 9]
[6 B0b 16E1EcF7G2Gd 58I3IeJ9K4Kf 9a a5 B0c 18E4F0]
[FcG8 54I0IcJ8K4 90 9c a8 b4 B0d 1aE7F4G1GeHbI8J5]
[K2Kf 9c a9 b6 c3 B0eDcEaF8G6H4I2J0JeKc 9a a8 b6 ]
[c4 d2 B0fDeEdFcGb 5aI9J8K7 96 a5 b4 c3 d2 e1 

Pretty simple if you know how /// works. It's just a few string replacements.

k, 50 bytes

`0:" "/'("0123456789abcdef"@16 16\)''{x*\:/:x}@!16

Alas, it is hindered by the lack of a built-in hexadecimal printer.

Reading right-to-left, more-or-less:

                                               !16 / make the array {0, 1, 2, ..., 15}
                                     {x*\:/:x}@    / cartesian product of the array multiplied by itself, results in a table
        (                         )''              / for each row, for each column
                            16 16\                 / decode int to two digits in base 16
         "0123456789abcdef"@                       / get the characters to form a string
   " "/'                                           / join the columns with a space, the table is now an array 
`0:                                                / print the array, each element is one line

SmileBASIC, 56 51 47 bytes

I=RND(16)J=RND(16)LOCATE I*3,J?HEX$(I*J,2)EXEC.

Python2, 102 97 92 90 89 bytes

i=1
exec"print' '.join('%02x'%(j-x)*(i>0)for x,j in enumerate(range(0,16*i,i)));i+=1;"*16

Output:

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
00 02 04 06 08 0a 0c 0e 10 12 14 16 18 1a 1c 1e
00 03 06 09 0c 0f 12 15 18 1b 1e 21 24 27 2a 2d
00 04 08 0c 10 14 18 1c 20 24 28 2c 30 34 38 3c
00 05 0a 0f 14 19 1e 23 28 2d 32 37 3c 41 46 4b
00 06 0c 12 18 1e 24 2a 30 36 3c 42 48 4e 54 5a
00 07 0e 15 1c 23 2a 31 38 3f 46 4d 54 5b 62 69
00 08 10 18 20 28 30 38 40 48 50 58 60 68 70 78
00 09 12 1b 24 2d 36 3f 48 51 5a 63 6c 75 7e 87
00 0a 14 1e 28 32 3c 46 50 5a 64 6e 78 82 8c 96
00 0b 16 21 2c 37 42 4d 58 63 6e 79 84 8f 9a a5
00 0c 18 24 30 3c 48 54 60 6c 78 84 90 9c a8 b4
00 0d 1a 27 34 41 4e 5b 68 75 82 8f 9c a9 b6 c3
00 0e 1c 2a 38 46 54 62 70 7e 8c 9a a8 b6 c4 d2
00 0f 1e 2d 3c 4b 5a 69 78 87 96 a5 b4 c3 d2 e1

Try it online!

C, 61 bytes

i;f(){while(i<256)printf("%02x%c",i%16*(i>>4),++i%16?32:10);}

Wandbox

JavaScript, 104 Bytes

s="";for(a=0;16>a;a++){for(b=0;16>b;b++)c=(a*b).toString(16),s=1==c.length?s+(" 0"+c):s+(" "+c);s+="\n"}

Call using variable s:

console.log("HEX Table: " + s)

Ungolfed code:

s=""; // Define s as empty string
for(a=0;16>a;a++){ // For y axis
  for(b=0;16>b;b++) // For x axis
    c=(a*b).toString(16),s=1==c.length?s+(" 0"+c):s+(" "+c); // Multiply and format
  s+="\n" // Add line breaks
}

05AB1E, 17 bytes

16F15ÝN*8o+h€¦ðý»

Try it online!

16F               For N in [0,15]
   15Ý            Push [0, ..., 15]
      N*          Multiply by N
        8o+       Add 256
           h      Take the uppercase hexadecimal representation
            €¦    Remove the leading 1 of each value
              ðý  Join with spaces
                » End for and join everything with newlines

There might be a better way to handle this in 05AB1E.

Scala, 56 bytes

for(x<-0 to 15){for(y<-0 to 15)printf("%02x ",x*y);println}

Ungolfed:

for(x<-0 to 15){
  for(y←0 to 15)
    printf("%02x ",x*y);
  println
}

Explanation:

for(x<-0 to 15){        //count from 0 to 15 using the variable x
  for(y←0 to 15)          //count from 0 to 15 using the variable y
    printf("%02x ",x*y);    //print x*y as a hex string with leading zeros and a width of 2 characters
  println                 //print a newline
}

Perl 6, 42 bytes

.fmt("%02x").put for (^16 X*^16).rotor: 16

Try it

Expanded:

.fmt("%02x") # format each element of list to lowercase hex
.put         # print with trailing newline

for          # for each of the following

(
  ^16  # Range upto ( and excluding ) 16
  X*   # cross multiplied with
  ^16
).rotor: 16 # break it up into chunks of 16 values

Perl, 48 bytes

for$a(@%=0..15){printf"%02x "x@%.$/,map$a*$_,@%}

Try it online!

I'm positive this isn't optimally golfed, but I'll be damned if I can find something better.

Code breakdown:

for$a(@%=0..15){printf"%02x "x@%.$/,map$a*$_,@%}
         0..15                                    #Create a list of the range 0 - 15...
      @%=                                         #...and store it in the array @%
for$a(        ){                               }  #Loop through @% with $a as the iterator
                printf[  string   ],[ params  ]   #Perl's port of the standard printf function
                      "%02x "                     #2-digit (hexit?) padding, followed by space...
                             x@%                  #...repeated 16 times (in scalar context, @% represents the size of array @%)...
                                .$/               #...followed by a newline
                                     map$a*$_,@%  #Loops through @%, and using $_ as the iterator, returns a list composed of each member of @% multiplied by the current $a

Octave, 34 bytes

disp(num2str((a=0:15)'*a,'%02x '))

Jelly, 12 bytes

⁴Ḷ×þ`d⁴‘ịØhG

Try it online!

How it works

⁴Ḷ×þ`d⁴‘ịØhG  Main link. No arguments.

⁴             Set the return value to 16.
 Ḷ            Unlength; yield [0, ..., 15].
  ×þ`         Build the multiplication table of [0, ..., 15] and itself.
     d⁴       Divmod 16; yield [p : 16, p % 16] for each product p.
       ‘      Increment quotients and remainders (1-based indexing).
        ịØh   Index into the lowercase hexadecimal alphabet.
           G  Grid; join columns by spaces, rows by newlines.

Matlab, 53 Bytes

for i=[0:15]'*[0:15];fprintf('%02X ',i);disp(' ');end

Sample output:

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F  
00 02 04 06 08 0A 0C 0E 10 12 14 16 18 1A 1C 1E  
00 03 06 09 0C 0F 12 15 18 1B 1E 21 24 27 2A 2D  
00 04 08 0C 10 14 18 1C 20 24 28 2C 30 34 38 3C  
00 05 0A 0F 14 19 1E 23 28 2D 32 37 3C 41 46 4B  
00 06 0C 12 18 1E 24 2A 30 36 3C 42 48 4E 54 5A  
00 07 0E 15 1C 23 2A 31 38 3F 46 4D 54 5B 62 69  
00 08 10 18 20 28 30 38 40 48 50 58 60 68 70 78  
00 09 12 1B 24 2D 36 3F 48 51 5A 63 6C 75 7E 87  
00 0A 14 1E 28 32 3C 46 50 5A 64 6E 78 82 8C 96  
00 0B 16 21 2C 37 42 4D 58 63 6E 79 84 8F 9A A5  
00 0C 18 24 30 3C 48 54 60 6C 78 84 90 9C A8 B4  
00 0D 1A 27 34 41 4E 5B 68 75 82 8F 9C A9 B6 C3  
00 0E 1C 2A 38 46 54 62 70 7E 8C 9A A8 B6 C4 D2  
00 0F 1E 2D 3C 4B 5A 69 78 87 96 A5 B4 C3 D2 E1 

R, 42 bytes

as.hexmode(sapply(0:15,function(x)x*0:15))

Prints the following:

      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16]
 [1,] "00" "00" "00" "00" "00" "00" "00" "00" "00" "00"  "00"  "00"  "00"  "00"  "00"  "00" 
 [2,] "00" "01" "02" "03" "04" "05" "06" "07" "08" "09"  "0a"  "0b"  "0c"  "0d"  "0e"  "0f" 
 [3,] "00" "02" "04" "06" "08" "0a" "0c" "0e" "10" "12"  "14"  "16"  "18"  "1a"  "1c"  "1e" 
 [4,] "00" "03" "06" "09" "0c" "0f" "12" "15" "18" "1b"  "1e"  "21"  "24"  "27"  "2a"  "2d" 
 [5,] "00" "04" "08" "0c" "10" "14" "18" "1c" "20" "24"  "28"  "2c"  "30"  "34"  "38"  "3c" 
 [6,] "00" "05" "0a" "0f" "14" "19" "1e" "23" "28" "2d"  "32"  "37"  "3c"  "41"  "46"  "4b" 
 [7,] "00" "06" "0c" "12" "18" "1e" "24" "2a" "30" "36"  "3c"  "42"  "48"  "4e"  "54"  "5a" 
 [8,] "00" "07" "0e" "15" "1c" "23" "2a" "31" "38" "3f"  "46"  "4d"  "54"  "5b"  "62"  "69" 
 [9,] "00" "08" "10" "18" "20" "28" "30" "38" "40" "48"  "50"  "58"  "60"  "68"  "70"  "78" 
[10,] "00" "09" "12" "1b" "24" "2d" "36" "3f" "48" "51"  "5a"  "63"  "6c"  "75"  "7e"  "87" 
[11,] "00" "0a" "14" "1e" "28" "32" "3c" "46" "50" "5a"  "64"  "6e"  "78"  "82"  "8c"  "96" 
[12,] "00" "0b" "16" "21" "2c" "37" "42" "4d" "58" "63"  "6e"  "79"  "84"  "8f"  "9a"  "a5" 
[13,] "00" "0c" "18" "24" "30" "3c" "48" "54" "60" "6c"  "78"  "84"  "90"  "9c"  "a8"  "b4" 
[14,] "00" "0d" "1a" "27" "34" "41" "4e" "5b" "68" "75"  "82"  "8f"  "9c"  "a9"  "b6"  "c3" 
[15,] "00" "0e" "1c" "2a" "38" "46" "54" "62" "70" "7e"  "8c"  "9a"  "a8"  "b6"  "c4"  "d2" 
[16,] "00" "0f" "1e" "2d" "3c" "4b" "5a" "69" "78" "87"  "96"  "a5"  "b4"  "c3"  "d2"  "e1" 

PowerShell, 46 bytes

0..15|%{$i=$_;"$(0..15|%{"{0:X2}"-f($i*$_)})"}

Try it online!

Loops from 0 to 15, sets $i to be that current number, then loops again. Uses the -format operator with the X2 designation to specify the output is heXadecimal padded to 2 spaces with leading zeros.

Of special note, and really the only golf, is that instead of using a (...)-join' ' to take the hex results, encapsulate them in an array, and concatenate them together into a string, we leverage the fact that the default $OutputFieldSeparator value for stringifying an array is a space. That means we can do a string with a script block in it "$(...)" instead, saving 6 bytes.

Those strings are all left on the pipeline, and output via implicit Write-Output at program completion gives us a newline between them for free.

Mathematica, 46 bytes

Grid@Array[IntegerString[1##,16,2]&,{16,16},0]

Straightforward implementation using the built-in IntegerString, in base 16, padding to length 2. The Array[...,{16,16},0] has the two variables each run from 0 to 15.

C#6, 98 bytes

()=>{int i,j;for(i=-1;++i<16;)for(j=-1;++j<16;)System.Console.Write($"{i*j:x2} {j<15?"":"\n"}");};

repl.it demo

Standard nested for-loop. Only trick is to print newline when j>=15.

Python 2, 60 bytes

for n in range(256):r=n%16;print'%02x%s'%(n/16*r,r/15*'\n'),

Try it online!

How it works

For all integers n from 0 to 255, we do the following.

Ruby, 49 bytes

256.times{|i|print"%02x "%(i/16*j=i%16),$/*j/=15}

Pretty straightforward use of the % operator equivalent to sprintf.

$/ is the line separator variable (\n by default.)

Note the use of assignments such as j/=15 to avoid longer parentheses (j/15)

WinDbg, 85 68 bytes

Formatting the output manually:

.for(rip=0;.<100;rip=.+1){.printf"%02x%c",./10*(.%10),a+(f>.%10)*16}

Or using a built-in to format the output, which also outputs some bonus text. Also 68 bytes:

.for(rip=0;.<100;rip=.+1){eb(8<<16)+. .%10*(./10)};db/c10 8<<16 L100

-17 bytes because it turns out the pseudo-register $ip can be read with ., so using that one instead of $t0.

WinDbg's default base is 16 so this looks essentially like it's just code to print the 10x10 decimal multiplication table.

How it works:

.for (r ip=0; .<100; r ip=.+1)        * Loop 256 times
{
    .printf "%02x%c", ./10*(.%10),    * Print the result, padded to 2 places
        a+(f>.%10)*16                 * Print a space or \n if end of line
}

* OR:

.for (r ip=0; .<100; r ip=.+1)        * Loop 256 times
{
    eb (8<<16)+. .%10*(./10)          * Put the result in memory
};
db /c10 8<<16 L100                    * Print the memory as bytes in lines of length 16

Sample output:

0:000> .for(rip=0;.<100;rip=.+1){.printf"%02x%c",./10*(.%10),a+(f>.%10)*16}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
00 02 04 06 08 0a 0c 0e 10 12 14 16 18 1a 1c 1e
00 03 06 09 0c 0f 12 15 18 1b 1e 21 24 27 2a 2d
00 04 08 0c 10 14 18 1c 20 24 28 2c 30 34 38 3c
00 05 0a 0f 14 19 1e 23 28 2d 32 37 3c 41 46 4b
00 06 0c 12 18 1e 24 2a 30 36 3c 42 48 4e 54 5a
00 07 0e 15 1c 23 2a 31 38 3f 46 4d 54 5b 62 69
00 08 10 18 20 28 30 38 40 48 50 58 60 68 70 78
00 09 12 1b 24 2d 36 3f 48 51 5a 63 6c 75 7e 87
00 0a 14 1e 28 32 3c 46 50 5a 64 6e 78 82 8c 96
00 0b 16 21 2c 37 42 4d 58 63 6e 79 84 8f 9a a5
00 0c 18 24 30 3c 48 54 60 6c 78 84 90 9c a8 b4
00 0d 1a 27 34 41 4e 5b 68 75 82 8f 9c a9 b6 c3
00 0e 1c 2a 38 46 54 62 70 7e 8c 9a a8 b6 c4 d2
00 0f 1e 2d 3c 4b 5a 69 78 87 96 a5 b4 c3 d2 e1

0:000> * OR:

0:000> .for(rip=0;.<100;rip=.+1){eb(8<<16)+. .%10*(./10)};db/c10 8<<16 L100
02000000  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
02000010  00 01 02 03 04 05 06 07-08 09 0a 0b 0c 0d 0e 0f  ................
02000020  00 02 04 06 08 0a 0c 0e-10 12 14 16 18 1a 1c 1e  ................
02000030  00 03 06 09 0c 0f 12 15-18 1b 1e 21 24 27 2a 2d  ...........!$'*-
02000040  00 04 08 0c 10 14 18 1c-20 24 28 2c 30 34 38 3c  ........ $(,048<
02000050  00 05 0a 0f 14 19 1e 23-28 2d 32 37 3c 41 46 4b  .......#(-27<AFK
02000060  00 06 0c 12 18 1e 24 2a-30 36 3c 42 48 4e 54 5a  ......$*06<BHNTZ
02000070  00 07 0e 15 1c 23 2a 31-38 3f 46 4d 54 5b 62 69  .....#*18?FMT[bi
02000080  00 08 10 18 20 28 30 38-40 48 50 58 60 68 70 78  .... (08@HPX`hpx
02000090  00 09 12 1b 24 2d 36 3f-48 51 5a 63 6c 75 7e 87  ....$-6?HQZclu~.
020000a0  00 0a 14 1e 28 32 3c 46-50 5a 64 6e 78 82 8c 96  ....(2<FPZdnx...
020000b0  00 0b 16 21 2c 37 42 4d-58 63 6e 79 84 8f 9a a5  ...!,7BMXcny....
020000c0  00 0c 18 24 30 3c 48 54-60 6c 78 84 90 9c a8 b4  ...$0<HT`lx.....
020000d0  00 0d 1a 27 34 41 4e 5b-68 75 82 8f 9c a9 b6 c3  ...'4AN[hu......
020000e0  00 0e 1c 2a 38 46 54 62-70 7e 8c 9a a8 b6 c4 d2  ...*8FTbp~......
020000f0  00 0f 1e 2d 3c 4b 5a 69-78 87 96 a5 b4 c3 d2 e1  ...-<KZix.......

MATL, 19 18 bytes

16:q&*1YAO3Z(!48e!

Try it online!

16:q   % Push [0 1 ... 15]
&*     % 16×16 matrix of pairwise products
1YA    % Convert to hexadecimal. Gives a 256×2 char array 
O3Z(   % Assign char 0 to 3rd column. Gives a 256×3 char array
!48e!  % Reshape in row-major order as a 48-column char array
       % Implicitly display. Char 0 is shown as space

Pyth - 24 23 bytes

Looking to golf the padding.

jjL;c16%L"%02x"*M^U16 2

Try it online here.