We report on a numerical study of the aspect-ratio dependency of Rayleigh-Benard convection, using direct numerical simulations. The investigated domains have equal height and width while the aspect ratio Gamma of depth per height is varied between 1/10 and 1. The Rayleigh numbers Ra for this study variate between 10(5) and 10(9), while the Prandtl number is Pr = 0.786. The main focus of the study concerns the dependency of the Nusselt number Nu and the Reynolds number Re on Ra and Gamma. It turns out that due to Gamma, differences to the cubic case (i.e., Gamma = 1) in Nu of up to 55% and in Re of up to 97% occur, which decrease for increasing Ra. In particular for small Gamma sudden drops in the Ra-scaling of Nu and Re appear for Ra approximate to 10(6). Further analysis reveals that these correspond to the onset of unsteady motion accompanied by changes in the global flow structure. The latter is investigated by statistical analysis of the heat flux distribution on the bottom and top plates and a decomposition of the instantaneous flow fields into two-dimensional modes. For Ra slightly above the onset of unsteady motion (i.e., Ra approximate to 10(6)) for all considered Gamma <= 1/3 a four-roll structure is present, which corresponds to thermal plumes moving vertically through the domain's center. For Ra >= 10(7), also for small Gamma, a single-roll structure is dominant, in agreement with two-dimensional simulations and experiments at larger Ra and Pr. (C) 2013 AIP Publishing LLC.