ShiftFract32
Overview
Arithmetic shift of integer or fractional data
Discussion
THIS MODULE IS DEPRECATED AND NOT RECOMMENDED FOR NEW DESIGNS. PLEASE USE THE ShiftBits MODULE INSTEAD.
Computes the arithmetic shift of a multichannel signal. The module supports fractional, and integer signals. numBits specifies the number of bit(between -31 and +31) positions to be shifted. If numBits is positive, left shift will be performed. If numBits is negative, right shift will be performed. Values outside of the allowable range are clipped. Negative values are sign extended when shifted left.
Module Pack
Standard
ClassID
classID = 194
Type Definition
typedef struct _ModuleShiftFract32
{
ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure
INT32 numBits; // Integer value that specifies the number of bits to shift the input.
} ModuleShiftFract32Class;
Variables
Properties
| Name | Type | Usage | isHidden | Default Value | Range | Units |
|---|---|---|---|---|---|---|
| numBits | int | parameter | 0 | 0 | -31:31 |
Pins
Input Pins
| Name | in |
| Description | Input signal |
| Data type | fract32 |
| Channel range | Unrestricted |
| Block size range | Unrestricted |
| Sample rate range | Unrestricted |
| Complex support | Real |
Output Pins
| Name | out |
| Description | Output signal |
| Data Type | fract32 |
Matlab Usage
File Name: shift_fract32_module.m
M=shift_fract32_module(NAME)
Arithmetic shift of integer or fractional data. Arguments:
NAME - name of the module.
Copyright 2008-12. DSP Concepts, Inc. All Rights Reserved.
Copyright (c) 2026 DSP Concepts, Inc.