Skip to main content
Skip table of contents

ShiftFract32

Overview

Arithmetic shift of integer or fractional data

Discussion

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.

Type Definition

CODE
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

CODE
 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.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.