From d98f46ce647846b0aa30b2e16a30fd4e152a1bf5 Mon Sep 17 00:00:00 2001 From: Carlos Maiolino Date: Thu, 10 Jul 2025 22:55:07 +0200 Subject: Add new code Signed-off-by: Carlos Maiolino --- CSAPP/shift.c | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 CSAPP/shift.c (limited to 'CSAPP/shift.c') diff --git a/CSAPP/shift.c b/CSAPP/shift.c new file mode 100644 index 0000000..3b088cf --- /dev/null +++ b/CSAPP/shift.c @@ -0,0 +1,7 @@ +long shift(long x, long n) { + x <<= 4; + x >>= n; + return x; +} + + -- cgit v1.2.3