How can a 1V sine-wave input be converted to a staircase sine-wave with an 8-bit resolution for instance in LTspice? Or is this even possible?

Can this be achieved without a complicated ADC circuitry? Does anybody have experience with that in LTspice?

[![enter image description here](https://i.stack.imgur.com/Ir08S.png)](https://i.stack.imgur.com/Ir08S.png)

**Edit:**

I found the following example so far:

```
Version 4 
SHEET 1 920 680 
WIRE -112 -16 -160 -16 
WIRE 176 0 144 0 
WIRE -160 32 -160 -16 
WIRE 448 48 352 48 
WIRE 592 48 544 48 
WIRE 176 64 144 64 
WIRE 544 80 544 48 
WIRE -160 144 -160 112 
WIRE -112 208 -160 208 
WIRE 544 208 544 160 
WIRE -160 256 -160 208 
WIRE -160 368 -160 336 
FLAG 544 208 0 
FLAG 592 48 sq 
IOPIN 592 48 Out 
FLAG -160 144 0 
FLAG -112 -16 s0 
FLAG 144 0 s0 
FLAG -160 368 0 
FLAG -112 208 fs 
FLAG 144 64 fs 
FLAG 448 48 vs0 
SYMBOL bv 544 64 R0 
SYMATTR InstName B1 
SYMATTR Value V=int(V(vs0)) 
SYMBOL voltage -160 16 R0 
WINDOW 123 0 0 Left 0 
WINDOW 39 0 0 Left 0 
SYMATTR InstName V1 
SYMATTR Value SINE(0 7.5 {f0}) 
SYMBOL SpecialFunctions\\sample 256 32 R0 
WINDOW 3 0 0 Invisible 0 
SYMATTR InstName A1 
SYMATTR Value2 vhigh=1e6 vlow=-1e6 
SYMATTR Value vt=0.5 
SYMBOL voltage -160 240 R0 
WINDOW 123 0 0 Left 0 
WINDOW 39 0 0 Left 0 
SYMATTR InstName V2 
SYMATTR Value PULSE(0 1 0 1n 1n 10u {1/fs}) 
TEXT -176 -160 Left 0 !.tran 0 3m 0 1u 
TEXT -176 -128 Left 0 !.options plotwinsize=0 
TEXT -176 -96 Left 0 !.param f0=1k fs=20k

```

Copy and save the above code in notepad with .asc extension and run in LTspice.

I get the following result for 1V sine input amplitude:

[![enter image description here](https://i.stack.imgur.com/jkn6n.png)](https://i.stack.imgur.com/jkn6n.png)

It seems like a sample and hold. But I couldn't figure out the formula to set the quantization resolution for a given amplitude. For example for 10Vpp input the resolution increases.