The 6-foot-9 Bairstow played in 18 games for Chicago last season, averaging 1.9 points and 5.7 minutes. He was drafted in the second round in 2014.
Dinwiddie was also a second-round pick that year. He averaged 4.8 points and 13.3 minutes in 12 games last season for the Pistons but was stuck behind Reggie Jackson and Steve Blake on the depth chart at point guard. Blake is an unrestricted free agent, so Detroit may need to acquire somebody new to back up Jackson next season.
The teams announced the trade Friday.