# Bit Streaming Processing Algorithms for Intelligent Hardware Converters
## 1 Introduction  
New approaches to the organization of computation and related hardware and software usually appear when existing solutions do not meet the growing technical requirements or when the element base changes significantly. At present, both of these factors affect the development of intelligent equipment, i.e., sensors, computing units operating near sensors, primary converters of measurement information, etc. To reduce the amount of transferred data and the load of the communication channels as much as possible, one can perform calculations near sensing devices, including at sensors, the endpoints of monitoring systems, and terminal devices of the Internet of Things [1]. The relocation of calculations close to the sensors leads to the new problems. First, it is necessary to perform the calculations in the same data format as generated at the sensor output. The absence of data format converters allows us to reduce the hardware cost. A frequently used option is near-sensor calculation in the analog form [2, 3]. Another option is pulse form calculations, since the conversion of analog signals into pulse time parameters is not complicated. The appropriate converters were introduced in [4, 5]. The data format conversion can be combined with the required calculations, as shown in [6, 7]. Second, we need to develop special calculators that will be fast, energy-efficient, capable of performing real-time analysis, and provide high fault-tolerance of information processing and transmission. Examples of such special calculators are stochastic near-sensor computations [8], memory-based computations using memory for individual tasks based on multiply-accumulate operation [9], and processor elements based on pulse unary processing [10]. The change in the element base for near-sensor computing is related to active FPGA development. FPGA can be used to create both simple transducers and system-on-chipdevices where software-hardware implementations are integrated [11; 12]. Many sensor signal converters focused on FPGA implementation can be eventually manufactured as ASICs, providing additional opportunities in terms of power efficiency, reliability, and accuracy, as shown in [13; 14]. The aim of this article is to introduce algorithms that perform functional processing of single pulse streams, PWM signal streams and binary codes simultaneously. Pulse coded signals (pulse-width modulated: PWM signals; pulse-frequency modulated: PFM signals) provide intrinsic immunity to interference. The information to be transmitted is encoded not in the signal amplitude but in the time parameters of the pulse signals. Such signals are often called \"bit streams\" since they use binary values of <0> or <1>, and the information is transmitted continuously. The main properties of bit stream processing algorithms are as follows:  
* Pulses in the bit stream are of equivalent weight; therefore, the bit stream conversion is highly reliable. Loss of one pulse in the stream is equivalent to loss of the least significant bit of the binary code, while loss of one bit in the code can lead to loss of value equal to 2i, where i stands for the lost bit position. * The usage of single wire instead of multi-bit buses simplifies data transmission between the endpoints and the computational cores of the systems. * Measurement and calculation processes can be easily parallelized. * The presence of pauses between pulses in the stream reduces the average power consumption that implies high energy efficiency. Implementation of transducers near sensors is one of the options to increase the endpoint devices' intelligence of sensor systems and the Internet of Things. This is in line with the general trend in the design of sensor information transducers. In this paper we introduce new algorithms for bit stream conversion that work in the tracking mode by means of a small increment technique. Functional conversions are factorized into the increment/decrement operations performed as soon as the pulse comes.