[Question]
  [
(Title with thanks to @ChasBrown)
[Sandbox](https://codegolf.meta.stackexchange.com/a/17585/56555) 
**The Background**
This challenge is inspired by a question that I recently posted on [Puzzling Stack Exchange](https://puzzling.stackexchange.com/questions/81925/sum-letters-are-not-two-different). Please feel free to follow the link if you are interested in the original question. If not then I won't bore you with the details here.
**The Facts**
Every printable standard ASCII character has a decimal value between 32 and 126 inclusive. These can be converted to their corresponding binary numbers in the range 100000 to 1111110 inclusive. When you sum the bits of these binary numbers you will always end up with an integer between 1 and 6 inclusive.
**The Challenge**
Given an integer between 1 and 6 inclusive as input, write a program or function which will output in any acceptable format all of the printable standard ASCII characters where the sum of the bits of their binary value is equal to the input integer.
**The Examples/Test Cases**
```
1 -> ' @'
2 -> '!"$(0ABDHP`'
3 -> '#%&)*,1248CEFIJLQRTXabdhp'
4 -> ''+-.3569:<GKMNSUVYZ\cefijlqrtx'
5 -> '/7;=>OW[]^gkmnsuvyz|'
6 -> '?_ow{}~'
```
An ungolfed Python reference implementation is available [here (TIO)](https://tio.run/##dc1NCoMwEAXgfU8xuErQjfGnIOQAXfUA6kKtqVk4kRjBnj5NLbUtxFm9GT7eTA8zKGTW3noBgkgKxQncKF7WWxBKwwoSQTd470nCopidP@o1DW8lkpXuh5Y3JSvqfe/42ExEoonaL5IC5mUkHeVc/pRtr0NedoN2le8O3ZtFIyg7aVcCwQWnxRQQV3hdzBYDCGE2mggSU@pyUGFw@tfMp9mRTnw6OdKpT6dHOvPp7EjnPp3v2j4B).
**The Rules**
1. Assume the input will always be an integer (or string representation of an integer) between 1 and 6 inclusive.
2. You may write a program to display the results or a function to return them.
3. Output may be in any reasonable format but **must be consistent for all inputs**. If you choose to output a quoted string then the same type of quotes must be used for all inputs.
4. Standard loopholes prohibited as usual.
5. This is code golf so shortest code in each language wins.
  
[Answer]
# x86-16 machine code, IBM PC DOS, ~~29~~ 25 bytes
**Machine code:**
```
00000000: be81 00ad b330 b108 d0c8 12dd e2fa 3adc  .....0........:.
00000010: 7502 cd29 fec0 79ec c3                   u..)..y..
```
**Listing:**
```
BE 0081     MOV  SI, 081H   ; SI = memory address of command line string
AD          LODSW           ; AL = start ASCII value (is 20H from space on cmd line)
                            ; AH = target number of bits (in ASCII)
        CHR_LOOP:
B3 30       MOV  BL, '0'    ; BL = counter of bits, reset to ASCII zero
B1 08       MOV  CL, 8      ; loop through 8 bits of AL
        BIT_LOOP:
D0 C8       ROL  AL, 1      ; rotate LSB of AL into CF
12 DD       ADC  BL, CH     ; add CF to BL (CH is always 0) 
E2 FA       LOOP BIT_LOOP   ; loop to next bit
3A DC       CMP  BL, AH     ; is current char the target number of bits?
75 02       JNE  NO_DISP    ; if not, do not display
CD 10       INT  29H        ; display ASCII char in AL (current char in loop)
        NO_DISP: 
FE C0       INC  AL         ; increment char to next ASCII value
79 EC       JNS  CHR_LOOP   ; if char <= 127, keep looping
C3          RET             ; return to DOS
```
Standalone PC DOS executable program, input number from command line. Output is displayed to console window.
[![enter image description here](https://i.stack.imgur.com/kQNqg.png)](https://i.stack.imgur.com/kQNqg.png)
[Answer]
# [CP-1610](https://en.wikipedia.org/wiki/General_Instrument_CP1600) assembly ([Intellivision](https://en.wikipedia.org/wiki/Intellivision)), 20 DECLEs1 = 25 bytes
Takes \$N\$ in **R0** and a pointer to the output buffer in **R4**. Writes all matching characters in the buffer and marks the end of the results with **NUL**.
```
                ROMW    10              ; use 10-bit ROM width
                ORG     $4800           ; map this program at $4800
                ;; ------------------------------------------------------------- ;;
                ;;  test code                                                    ;;
                ;; ------------------------------------------------------------- ;;
4800            EIS                     ; enable interrupts
4801            MVII    #$103,    R4    ; set the output buffer at $103 (8-bit RAM)
4803            MVII    #2,       R0    ; test with N = 2
4805            CALL    getChars        ; invoke our routine
4808            MVII    #$103,    R4    ; R4 = pointer into the output buffer
480A            MVII    #$215,    R5    ; R5 = backtab pointer
480C  draw      MVI@    R4,       R0    ; read R0 from the buffer
480D            SLL     R0,       2     ; R0 *= 8
480E            SLL     R0
480F            BEQ     done            ; stop if it's zero
4811            ADDI    #7-256,   R0    ; draw it in white
4815            MVO@    R0,       R5
4816            B       draw            ; go on with the next entry
4818  done      DECR    R7              ; loop forever
                ;; ------------------------------------------------------------- ;;
                ;;  routine                                                      ;;
                ;; ------------------------------------------------------------- ;;
      getChars  PROC
4819            MVII    #32,      R1    ; start with R1 = 32
481B  @loop     MOVR    R1,       R3    ; copy R1 to R3
481C            CLRR    R2              ; clear R2
481D            SETC                    ; start with the carry set
481E  @count    ADCR    R2              ; add the carry to R2
481F            SARC    R3              ; shift R3 to the right (the least
                                        ; significant bit is put in the carry)
4820            BNEQ    @count          ; loop if R3 is not zero
4822            CMPR    R2,       R0    ; if R2 is equal to R0 ...
4823            BNEQ    @next
4825            MVO@    R1,       R4    ; ... write R1 to the output buffer
4826  @next     INCR    R1              ; advance to the next character
4827            CMPI    #127,     R1    ; and loop until 127 is reached
4829            BLT     @loop
482B            MVO@    R3,       R4    ; write NUL to mark the end of the output
482C            JR      R5              ; return
                ENDP
```
### Output for N=2
NB: The opening parenthesis looks a lot like an opening square bracket in the Intellivision font. Both characters are distinct, though.
[![output](https://i.stack.imgur.com/DxHlW.gif)](https://i.stack.imgur.com/DxHlW.gif)
*screenshot from [jzIntv](http://spatula-city.org/~im14u2c/intv/)*
---
*1. A CP-1610 opcode is encoded with a 10-bit value, known as a 'DECLE'. This routine is 20 DECLEs long, starting at $4819 and ending at $482C (included).*
[Answer]
# [Python 2](https://docs.python.org/2/), 62 bytes
```
lambda n:[chr(i)for i in range(32,127)if bin(i).count('1')==n]
```
[Try it online!](https://tio.run/##PcvBCoQgEIDhV5mbCkOgbQWBT1J7sDZrosYQO@zTm6fO//9d/7QFNtnbMR/unH4OuB/mLUpSPkQgIIboeF1kbVCbTpGHibjkag43Jym0UNbyN7@7RoM1frDBtocrEicgBCGqPRToC1X5AQ "Python 2 – Try It Online")
[Answer]
# [Perl 6](https://github.com/nxadm/rakudo-pkg), ~~41~~ 34 bytes
```
{chrs grep *.base(2)%9==$_,^95+32}
```
[Try it online!](https://tio.run/##K0gtyjH7n1upoJamYPu/OjmjqFghvSi1QEFLLymxOFXDSFPV0tZWJV4nztJU29io9n9xYqWCHlBxWn6RgqGenpn1fwA "Perl 6 – Try It Online")
Anonymous code block that takes a number and returns a string of valid characters.
### Explanation:
```
{                                }  # Anonymous code block taking a number
      grep                ,^95+32   # Filter from the range 32 to 126
           *.base(2)                # Where the binary of the digit
                    %9                # When parsed as a decimal modulo 9
                      ==$_            # Is equal to the input
 chrs                               # And convert the list of numbers to a string
```
It can be proven that for any number \$n\$ in base \$b\$, \$n \equiv \text{digitsum}(n) \pmod{b-1}\$ (clue: remember that \$b \pmod{b-1}=1\$). 
We can use this to get the digitsum of our binary number by parsing it as a decimal number and moduloing by 9, which is valid because the range of numbers we are using is guaranteed to have less than 9 bits. This is helped along by Perl 6's automatic casting of the binary string to a decimal number when used in a numeric context.
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 8 bytes
```
žQʒÇbSOQ
```
[Try it online!](https://tio.run/##yy9OTMpM/f//6L7AU5MOtycF@wf@/28MAA "05AB1E – Try It Online")
**Explanation**
```
žQ        # push the printable ascii characters
  ʒ       # filter, keep elements whose
   Ç      # character code
    b     # converted to binary
     SO   # has a digit sum
       Q  # equal to the input
```
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 8 bytes
```
ØṖOB§=ʋƇ
```
[Try it online!](https://tio.run/##y0rNyan8///wjIc7p/k7HVpue6r7WPv///@NAA "Jelly – Try It Online")
```
ØṖ       printable ascii character list
  OB     to binary
    §    popcount
     =   equal to input?
      ʋƇ filter (implicitly output)
```
[Answer]
# [Brachylog](https://github.com/JCumin/Brachylog), 7 bytes
```
∈Ṭ&ạhḃ+
```
[Try it online!](https://tio.run/##AUUAuv9icmFjaHlsb2cy/3t3IiAtPiAidz9@4oaw4oKC4bag4bqJfeG1kP/iiIjhuawm4bqhaOG4gyv//1sxLDIsMyw0LDUsNl0 "Brachylog – Try It Online")
A predicate which [functions as a generator](https://codegolf.meta.stackexchange.com/a/10753/85334), takes input through its output variable, and produces each character through its input variable. Because Brachylog.
```
           The input variable (which is an element of the output)
∈          is an element of
 Ṭ         the string containing every printable ASCII character
  &        and the input
   ạh      converted to a codepoint
     ḃ     converted to a list of binary digits
      +    sums to
           the output variable (which is the input).
```
[Answer]
# [JavaScript (Node.js)](https://nodejs.org), 60 bytes
*Using [Jo King's modulo trick](https://codegolf.stackexchange.com/a/184649/58563)*
```
n=>(g=x=>x>>7?'':Buffer(x.toString(2)%9-n?0:[x])+g(x+1))(32)
```
[Try it online!](https://tio.run/##ZchLCsIwEADQvfeQzlBaNPWDhaTgFVyKi1KT0FJmJE3L3D66lbzlm/qtX4YwfmJF/LbJ6UTagNeijRhz7Yqiva/O2QBSR37EMJIHhftbRd2hfcoLSw9SHhGhUZgGpoVnW8/swcFvd/@jsmmyOWVzzuaCmL4 "JavaScript (Node.js) – Try It Online")
---
# [JavaScript (Node.js)](https://nodejs.org), ~~70~~ 69 bytes
```
n=>(g=x=>x>>7?'':Buffer((h=x=>x&&x%2+h(x>>1))(x)-n?0:[x])+g(x+1))(32)
```
[Try it online!](https://tio.run/##ZclLCoMwEADQfe@hzhCUNrYKQiL0GqULsUlUJBF/zO1T665k@97Q7M3Szv20ptZ9lNfCWyHBCBKSpCzrJKmem9ZqBuhOjGOKOOvg2BsiEKa2vlYveiMzQOxnOUffOru4UWWjM6Dh0Mu/8EDyQO6BPAIpEP0X "JavaScript (Node.js) – Try It Online")
### Commented
```
n => (              // n = input
  g = x =>          // g = recursive function, taking a byte x
    x >> 7 ?        //   if x = 128:
      ''            //     stop recursion and return an empty string
    :               //   else:
      Buffer(       //     create a Buffer:
        (h = x =>   //       h = recursive function taking a byte x
          x &&      //         stop if x = 0
          x % 2 +   //         otherwise, add the least significant bit
          h(x >> 1) //         and do a recursive call with floor(x / 2)
        )(x)        //       initial call to h
        - n ?       //       if the result is not equal to n:
          0         //         create an empty Buffer (coerced to an empty string)
        :           //       else:
          [x]       //         create a Buffer consisting of the character x
      ) +           //     end of Buffer()
      g(x + 1)      //     append the result of a recursive call to g with x + 1
)(32)               // initial call to g with x = 32
```
[Answer]
# [Japt](https://github.com/ETHproductions/japt), 9 bytes
```
;EÆ¶Xc¤è1
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=O0XGtlhjpOgx&input=Ng) or [test all inputs](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&header=xA&code=O0XGtlhjpOgx&footer=KyIgPSAiK1Y&input=NgotbVI)
```
;EÆ¶Xc¤è1     :Implicit input of integer U
;E            :Printable ASCII
  Æ           :Filter each X
   ¶          :Test U for equality with
    Xc        :  Character code of X
      ¤       :  To binary string
       è1     :  Count the 1s
```
[Answer]
# Excel (2016 or later), 76 bytes
```
=CONCAT(IF(LEN(SUBSTITUTE(DEC2BIN(ROW(32:126)),0,))=A1,CHAR(ROW(32:126)),""))
```
Takes input from A1, outputs in whatever cell you put this formula. This is an array formula, so you need to press `Ctrl`+`Shift`+`Enter` to input it. The "2016 or later" is because it needs the `CONCAT` function (the deprecated `CONCATENATE` won't take an array as argument).
[Answer]
# C (standard library), 74 67 bytes
```
i;j;k;f(n){for(i=31;i<126;k||puts(&i))for(k=n,j=++i;j;j/=2)k-=j&1;}
```
Using only standard library functions. Thanks go to @gastropner for improvement from 74 to 67 bytes.
[Try it online!](https://tio.run/##FctLCoAgEADQtZ7CVcxQERa0meYwIRijZNFnZZ3daP14rl2cK0UoUCQPCbPfDhAeLMlk@5Hi8@z3dUIliD9FTk3guv5H6LjH2HKoLL1F0mXWWRKgyVp5sEj61ap8)
[Answer]
# [R](https://www.r-project.org/), 77 68 bytes
### Approach using for loop
-9 bytes thanks to Giuseppe
```
n=scan();for(i in 32:126)if(sum(intToBits(i)>0)==n)cat(intToUtf8(i))
```
[Try it online!](https://tio.run/##K/r/P8@2ODkxT0PTOi2/SCNTITNPwdjIytDITDMzTaO4NFcjM68kJN8ps6RYI1PTzkDT1jZPMzmxBCIcWpJmARTW/G/yHwA "R – Try It Online")
### Previously:
# [R](https://www.r-project.org/), 78 69 66 bytes
-12 bytes thanks to Giuseppe
```
a=32:126;cat(intToUtf8(a[colSums(sapply(a,intToBits)>0)==scan()]))
```
Turns the numbers 32 to 126 into a matrix of bits then sums across the rows to find which match the input number.
[Try it online!](https://tio.run/##K/r/P9HW2MjK0MjMOjmxRCMzryQkP7QkzUIjMTo5Pye4NLdYozixoCCnUiNRByzplFlSrGlnoGlrW5ycmKehGaup@d/kPwA "R – Try It Online")
[Answer]
# Java 10, ~~98~~ ~~97~~ ~~94~~ ~~70~~ 67 bytes
```
n->{for(var c='';c-->31;)if(n.bitCount(c)==n)System.out.print(c);}
```
-24 bytes thanks to *NahuelFouilleul*.
[Try it online.](https://tio.run/##ZU@xasNADN3zFY8sucPYEAoder0snTo0S8bS4XKxjRJHDndnQwmmn@7KrunQCkmgJ@np6ex6l59Pl9E3Lka8OeL7CiBOZaicL7GfSqBv6QSvXgWvywDWRuBBQjwml8hjD4bFyPnuXrVB9S7A283Xxvg83z1sjaZKcXGk9NJ2nJTX1rI@fMZUXou2S8Ut0AybYTQrob11x0ZoF/ZZwFXkqUOSwfr9Ay7UUf/Imw7KNshuDejZPkrOsqUJ/LtC2foJ6/mJybjwin6rv9MNq6U3zE8P4zc)
**Explanation:**
Contains an unprintable character with unicode value `127`.
```
n->{                         // Method with Integer parameter and no return-type
  for(var c='';c-->31;)     //  Loop character `c` in the range ['~', ' '] / (127,31):
    if(n.bitCount(c)         //   If the amount of 1-bits in the two's complement binary
                             //   representation of the current characters
                    ==n)     //   equals the input:
      System.out.print(c);}  //    Print the current character
```
[Answer]
# Java 8, ~~131~~ 71 bytes
-60 bytes thanks to everyone in the comments  
  
Returns a `java.util.stream.IntStream` of codepoints
```
n->java.util.stream.IntStream.range(32,127).filter(i->n.bitCount(i)==n)
```
[Try it online!](https://tio.run/##dY4xa8MwEEZ3/4obJbCPJoV2MA6UQKBDoZCxdFBsyT1XPgXpnBKMf7urtkO7dLo3fPd4g7mYauje19ablODJEM8FsdjoTGvhMA95gJOQxyTRmhEfWY7fBE5ltr2NwLpeivN08tRCEiP5XAJ1MGadymvi/uUVTOyTnosDOGhWrnb/qzEa7q263Zab7b1GRz4HKap2jCeSfZhYFOmmYb3WX7VZ3obOPofMCRpw6NSdRgkPMZqr0nVxvCaxI4ZJ8JxzxLNi@wE/ber3ubwp/6jQW@7lTWfBsqyf)  
  
Using HashSet, 135 bytes. Returns a `Set<Object>`:
```
n->new java.util.HashSet(){{for(int i=31;i++<126;add(Long.toBinaryString(i).chars().map(c->c-48).sum()==n?(char)i+"":""),remove(""));}}
```
[Try it online!](https://tio.run/##RY5BT4QwEIXv/IqG0zRIk12NMSBrYuLGg572aDyMpUARWtIOmA3Z346jHjzNS95737weF8z7@nPTA8YoXtG6NbGOTGhQG3Fcew6omeygToZEA@wJJ8tLMs0fg9UiEhKfxdtajNyGEwXr2rd3DG2Ua3IUTbW5/ODMl/hnPWPsmAdyXRsffqG2ut6VNsvud/vbEusaXrxrFflH6zCc/6hgpdIdhghSjTiBzg86v7mTKs4jyKpyD/BjS5ulaZGm8iqY0S8GWPLky1YmjWpgz3kKBrmiog9kahY84wl1B6dzJDMqP1NRTPyTZJlw8xs)
[Answer]
# [C# (Visual C# Interactive Compiler)](http://www.mono-project.com/docs/about-mono/releases/5.0.0/#csc), 86 bytes
```
n=>Enumerable.Range(32,95).Where(x=>"0123456".Sum(g=>x>>g-48&1)==n).Select(x=>(char)x)
```
Thanks to @ExpiredData for giving me the idea to use `Sum()`! When I get back to my PC, I will replace the string `"0123456"` with unprintables, saving three bytes.
[Try it online!](https://tio.run/##RY1NC4JAFADv/grxEPvIlrTsS3cvURB0yoNnW572QF@wriCIv93q1HUYZky3Mh3N155NRuzC24X7Fm35bDAzr9JqXamZlf5j@Si5RrGJw2MCsnihRTEoHayjeLNNdoHM@1bUSg9a16vtYRGBUgwyxwaN@5ni14UB5tSr3lZ8rz6pKKVsn9JyCZ7vF5Yc3olRBON6OvljNAUhhZ2zxLU8v9mUTlSCACCdPw "C# (Visual C# Interactive Compiler) – Try It Online")
[Answer]
# Dyalog APL Extended, ~~24~~ 22 bytes
```
⎕ucs a⌿⍨⎕=+⌿2⊤a←32…126
```
[Try it online!](https://tio.run/##SyzI0U2pTMzJT9dNrShJzUtJTfn/qKNdIe3/o76ppcnFComPevY/6l0B5NlqA5lGj7qWJD5qm2Bs9KhhmaGRGUjx/zQuQ640LiMgNgZiEyA2BWIzAA "APL (Dyalog Extended) – Try It Online")
-2 bytes thanks to [ngn](https://codegolf.stackexchange.com/users/24908/ngn)
Alternative 22 bytes in regular Dyalog APL by ngn:
```
⎕ucs 32+⍸⎕=32↓+/↑,⍳7⍴2
```
[Try it online!](https://tio.run/##SyzI0U2pTMzJT///qG9qZv6jtgkGXI862hXSQPzS5GIFYyPtR707gBxbY6NHbZO19R@1TdR51LvZ/FHvFqP/QKX/07gMudK4jIDYGIhNgNgUiM0A "APL (Dyalog Unicode) – Try It Online")
[Answer]
# [Factor](https://factorcode.org/), 52 bytes
```
[ 32 126 [a,b] [ bit-count = ] with filter >string ]
```
[Try it online!](https://tio.run/##JYyxDoIwFEV3v@J@gJKAiYNGV@PCYpxIh9I8oAFKfX2E@PX1JWz35J6czjpZOH/er/p5xWxlKNiGntK@Wy@bT4SRONCERN@VgtM3CfvQJ0QmkV9UENwOFzTlsTW5wblCWSlaRTTQzsktq0p3GGxeBnR@EmI89hJMnm3UrHVjkf8 "Factor – Try It Online")
* `32 126 [a,b]` Create a range of printable ascii values
* `[ bit-count = ] with filter` Select values with the bit count indicated by the input
* `>string` Convert the result from a sequence of code points to a printable string
[Answer]
# [J](https://www.jsoftware.com), ~~31~~ ~~27~~ 23 bytes
```
((=1#.#:)u:@#])32+i.@95
```
*-2 thanks to south*
[Attempt This Online!](https://ato.pxeger.com/run?1=m70wa8FOJT31NAVbKwV1BR0FAwUrINbVU3AO8nFbWlqSpmuxXUPD1lBZT9lKs9TKQTlW09hIO1PPwdIUIrtNkys1OSNfIU1JW8FQwUjBWMFEwVTBDCK5YAGEBgA)
# [J](http://jsoftware.com/), ~~31~~ 27 bytes
*-4 bytes thanks to Galen*
```
[:u:32+[:I.]=1#.32#:@+i.@95
```
[Try it online!](https://tio.run/##y/qvpKeepmBrpaCuoKNgoGAFxLp6Cs5BPm7/o61KrYyNtKOtPPVibQ2V9YyNlK0ctDP1HCxN/2typSZn5AM1Oagr6FoppCkYQgUUlVQ0DBydXDwCEqAyRlAZZVU1TS0dQyMTC2dXN08vn8CgkIjEpJSMAqg6Y6g6@/j88uraOqioGdd/AA "J – Try It Online")
## Original Answer
```
a.#~&(95{.32}.])]=1#.2#:@i.@^8:
```
[Try it online!](https://tio.run/##y/qvpKeepmBrpaCuoKNgoGAFxLp6Cs5BPm7/E/WU69Q0LE2r9YyNavViNWNtDZX1jJStHDL1HOIsrP5rcqUmZ@QDNTqoK@haKaQpGEIFFJVUNAwcnVw8AhKgMkZQGWVVNU0tHUMjEwtnVzdPL5/AoJCIxKSUjAKoOmOoOvv4/PLq2jqoqBnXfwA "J – Try It Online")
* `2#:@i.@^8:` produces the binary numbers 0 through 255 (`2 ^ 8` is 256)
* `1#.` sums each one
* `]=` produces a binary mask showing where the sum equals the original input
* `a.#~ mask` uses that binary mask to filter J's full ascii alphabet `a.`
* `&(95{.32}.])` but before doing so take only elements 32...126 from both the alphabet and the mask
[Answer]
# [Python 2](https://docs.python.org/2/), 69 bytes
```
lambda n:[chr(i)for i in range(32,127)if sum(map(int,bin(i)[2:]))==n]
```
[Try it online!](https://tio.run/##Dco7DoAgDADQq3RsExbrYELCSZQBP2gTKQR18PTo@vLKex9ZuUU3tTOkeQ2gdlyOikIxVxAQhRp037Bn0/FAEuF6EqZQUPQ2s@hfR7aeyDn1rdSfMSITtQ8 "Python 2 – Try It Online")
[Answer]
# [Gaia](https://github.com/splcurran/Gaia), 10 bytes
```
₵R⟪¤cbΣ=⟫⁇
```
[Try it online!](https://tio.run/##AR0A4v9nYWlh///igrVS4p@qwqRjYs6jPeKfq@KBh///Mw "Gaia – Try It Online")
```
		| implicit input, n
₵R		| push printable ascii
  ⟪	⟫⁇	| filter the list where:
   ¤cbΣ		| the sum of the code point in binary
       =	| is equal to n
```
[Answer]
# [Ruby](https://www.ruby-lang.org/), 48 bytes
```
->n{(' '..?~).select{|x|x.ord.digits(2).sum==n}}
```
[Try it online!](https://tio.run/##KypNqvyfZvtf1y6vWkNdQV1Pz75OU684NSc1uaS6pqKmQi@/KEUvJTM9s6RYwwgoU5pra5tXW/u/QCEt2ij2PwA "Ruby – Try It Online")
[Answer]
# [Perl 5](https://www.perl.org/) `-a`,  ~~50~~ 43 bytes
*@NahuelFouilleul saves 7 bytes*
```
map{$_=chr;unpack('B*')%9-"@F"||say}32..126
```
[Try it online!](https://tio.run/##K0gtyjH9/z83saBaJd42OaPIujSvIDE5W0PdSUtdU9VSV8nBTammpjixstbYSE/P0Mjs/3/jf/kFJZn5ecX/dX1N9QwMDf7rJgIA "Perl 5 – Try It Online")
[Answer]
# [K (ngn/k)](https://gitlab.com/n9n/k), 20 bytes
**Solution:**
```
`c$32+&(+/2\32+!95)=
```
[Try it online!](https://tio.run/##y9bNS8/7/z8hWcXYSFtNQ1vfKAbIULQ01bQ1@/8fAA "K (ngn/k) – Try It Online")
**Explanation:**
Evaluated right-to-left:
```
`c$32+&(+/2\32+!95)= / the solution
                   = / equals?
       (          )  / do this together
               !95   / range 0..94
            32+      / add 32, so range 32..126
          2\         / break into base-2
        +/           / sum up
      &              / indices where true
   32+               / add 32
`c$                  / cast to character
```
[Answer]
# 6502 assembly (NES), 22 bytes
Machine code:
```
a0 1f a6 60 c8 98 30 fb ca 0a b0 fc d0 fb e8 d0 f1 8c 07 20 f0 ec
```
Assembly:
```
    ldy #$1f ; Y holds the current character code
NextCharacter:
    ldx $60 ; load parameter into X
    iny
    tya
    bmi (NextCharacter + 1) ; exit at char 128, #$60 is the return opcode
CountBits:
    dex
Continue:
    asl
    bcs CountBits
    bne Continue
CompareBitCount:
    inx ; fixes off-by-one error and sets Z flag if bit count matches
    bne NextCharacter
    sty $2007
    beq NextCharacter ; always branches
```
[Full program](https://hastebin.com/raw/xemikiwege.asm). Tested with FCEUX 2.2.3, should work on any standard NES emulator.
Inspired by Ryan Russell's answer. Input given at CPU address $60. Outputs to the console's Picture Processing Unit memory.
[Answer]
# VBA, 146 bytes
```
Sub Main()
n=3
For i=32 To 127
b=CStr(Application.WorksheetFunction.Dec2Bin(i))
If Len(b)-Len(Replace(b,"1",""))=n Then MsgBox Chr(i)
Next
End Sub
```
I wonder if somehow it could be done using Excel alone, I am not a excel formula pro....
[Answer]
# [Nibbles](http://golfscript.com/nibbles), 5 bytes
```
|_~`^+`@ 2
```
That's 10 nibbles each encoded as half a byte in the binary form.
Translation:
```
|          filter
 _         printables (since stdin is empty)
 ~         not
  `^       xor
    +      sum
     `@2   to base 2
        $  filter var (implicit)
    @      first input arg (implicit)
```
It uses not of the xor to set itself up for implicit args (instead of == which wouldn't be able to use any)
Usage:
```
nibbles <filename>.nbl <input number>
```
Nibbles isn't on TIO yet...
[Answer]
# [Python 3.10](https://www.python.org), 58 bytes
```
lambda n:(chr(i)for i in range(32,127)if i.bit_count()==n)
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m72soLIkIz9vweI025ilpSVpuhY3rXISc5NSEhXyrDSSM4o0MjXT8osUMhUy8xSKEvPSUzWMjXQMjcw1M9MUMvWSMkvik_NL80o0NG1t8zShJmih6TDUMde04uIsKMoEKlRS0svKz8zTSAOarAnVsWABhAYA)
It's kind of like [Lynn's answer](https://codegolf.stackexchange.com/a/183631/112099).  
Just it uses the `.bit_count` introduced in Python3.10, so its shorter
More info about `.bit_count` here: <https://docs.python.org/3/library/stdtypes.html>
[Answer]
# [Kotlin](https://kotlinlang.org), 60 bytes
```
{n->(32..127).filter{n==it.countOneBits()}.map{it.toChar()}}
```
Note:  
For the moment Kotlin's STDOUT in ATO is always empty.  
And TIO doesn't support countOneBits().
More information about how to count bytes for a Kotlin answer:
<https://codegolf.stackexchange.com/a/202985/112099>
[Attempt This Online!](https://ato.pxeger.com/run?1=LYwxCsJAEEX7nCIEhN1iBxILRUwKrQTBQi-wSFZHN7MhmdgsOYlNGr1TbuMGU314n_fe36djizSMC9NRXGkkIX300jY2G3Eglqo4Ysvb_V03RZx_OjZqPW49qUIsM4A0W0kwaLlsPOU5MlxdR3yicofcCtlDpWsfMLspEUA_N5RIAYI8_XWDxJaEEcgSHg7p4s4c4E0kiZR9NEvD8N8f)
[Answer]
# [MATL](https://github.com/lmendo/MATL), 10 bytes
```
6Y2tB!si=)
```
[Try it online!](https://tio.run/##y00syfn/3yzSqMRJsTjTVvP/fxMA "MATL – Try It Online")
## Explanation
```
6Y2        % All ASCII Chars
   t       % dup
    B      % convert each to binary
     !     % transpose
      s    % sum
       i=  % equal to the input?
         ) % Keep truthy elements
```
[Answer]
# [Wolfram Language (Mathematica)](https://www.wolfram.com/wolframscript/), 70 bytes
```
FromCharacterCode/@Select[32~Range~126,s=#;Tr@IntegerDigits[#,2]==s&]&
```
[Try it online!](https://tio.run/##BcHBCoMwDADQXxEET4Kswi5SKDiE3YbuVnoIXYiFtYU0Z389vpdBTswgKYKS1Y1rXk9giIK81h9O7sA/RvGzuXYohNfDPMdm@@XL7l0ECfmVKEnz/WiCtW0Ig344FekceRNUbw "Wolfram Language (Mathematica) – Try It Online")
]